IIS App pool crashing on startup


Today I found my IIS application pool crashes on start up with the following error: The identity of application pool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request.

If you have no time to read the full post, here is the summary. My application pool was getting disabled or shutdown on first request to the website but there were no helpful error message in event log. At end of the troubleshooting, I found the problem was the password used for the impersonated user account was disabled. Setting 'password never expires' for the impersonated user account resolved this error.

Read my full experience in dealing with this problem...

Today was not a very good day for me. I woke up this morning to see that one of my popular website with very good traffic has been down last night, denying service to thousands of users and also losing me some decent revenue.

My immediate reaction was, let me restart the App Pool and get this site up and running. I logged on to the server and found the App pool was stopped. I right clicked on it and selected "Recycle" and I am done.

Just to make sure everything is normal and running, I tried to run the website again but it came back with the error:

HTTP Error 503. The service is unavailable.

Well, I thought I did restart the application pool, but may be I did not! So I went back to the server, recycled app pool and restarted even the website to make sure we start everything from a clean slate.

Came back to the browser and typed the url again. Oops, the site is still not coming up and showed the exact same error again: HTTP Error 503. The service is unavailable.

This time I started scratching my head. It has been a healthy website running without any problems till yesterday. I could not figure out what went wrong when I was sleeping. I looked at the database and it is opening and connecting correctly. What else could go wrong?

I decided to explore more, but did restart IIS once to see if that does the magic. Unfortunately, that also did not help.

Now I am clueless. No matter how many times I restart app pool, the moment I open the website, app pool will stop.

Now I looked at the event again and found one interesting warning:

The identity of application pool X is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request. If batch logon rights are causing the problem, the identity in the IIS configuration store must be changed after rights have been granted before Windows Process Activation Service (WAS) can retry the logon. If the identity remains invalid after the first request for the application pool is processed, the application pool will be disabled. The data field contains the error number.

The event log message suggested few things:

1. Something wrong with the application pool identity

2. User name or password of the identity is wrong

3. Permission problem related "batch logon rights".

I went through all possible settings I can think of based on the above error. I added the impersonated user to the IIS_USERS group as suggested in various forums for the said error. Unfortunately, nothing helped and the problem continued. As soon as I open the website, I application pool will stop.

As a last attempt, I completed deleted the website and application pool and recreated everything. I spent sometime to reconfigure the application pool identity and authenticated user account for the website. To my surprise, the problem was not resolved.

I search all over the web looking for similar problems and solutions. I saw many people reporting the same exact event log message but none of the solutions that worked for others helped me. My application pool continued to stop when I launch the website.

I decided to take a short break and then started going through each and every property on the IIS website settings. During this, I came across some interesting messages in the "Test Connection" dialog:

1. The credentials used to access the specified physical path are invalid. Verify the credentials and test these settings again.

2. Logon failure: the specified account password has expired. (Exception from HRESULT: 0x80070532)



This was a helpful hint on what is causing the problem. I figured out the password for the impersonated user account was expired.

Now I am able to map the below event log message to the real problem:

The identity of application pool is invalid. The user name or password that is specified for the identity may be incorrect, or the user may not have batch logon rights. If the identity is not corrected, the application pool will be disabled when the application pool receives its first request.

Since the password was expired, the application pool find the identity as invalid to use and so it is getting disabled on the first request.

I wish the event log message was more explanatory indicating the real problem - expired password.

If you are having the similar problem (application pool disabled on first request to your website), here is the solution to the problem:

Editing the user account in User Accounts and choosing the option "Password never expires" will solve the problem

You can choose the "password never expires" option by following the below steps:

1. Open computer management

2. Choose Local users and groups

3. Choose users

4. Double click on the specific user name on the right side.

5. In the "General" tab, choose the option "Password never expires".

Save it and you are done.



Article by Tony John
Tony John is a professional blogger from India, who started his first Weblog in 1998 at Tripod.com. Tony switched to blogging as a passion blended business in the year 2000 and currently operates several popular web properties including IndiaStudyChannel.com, Techulator.com, dotnetspider.com and many more.

Follow Tony John or read 669 articles authored by Tony John

Related Articles

More articles: IIS Server IIS Server

Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: