Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Pools not starting after iisreset

Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..

What we have:

  • Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)

  • Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each application pool running under an other windows account.

What happens:

  • All appPools are started, all services operational
  • IISReset is executed (or the machine is rebooted)
  • IIS comes back up, but not all application pools start properly. Sometimes they all come back up, sometimes one or more pools won't start. They can be started manually however.

Is this "normal" iis behavior and should I just avoid using iisreset, or are we doing something wrong in our .NET code?

like image 756
thijs Avatar asked Oct 29 '08 12:10

thijs


People also ask

Does Iisreset stop app pool?

IISRESET stops the application pools instead, which causes immediate and prolonged downtime. The downtime is extended because ALL application pools must stop to complete the IISRESET process, instead of just the application pool that is being recycled.

How do I automatically restart application pool in IIS?

Configuring Auto-Start with IIS ManagerIn the Connections pane, select the Application Pools node, revealing the Application Pools pane in the main view. Select the application pool for which you wish to enable Auto-Start. Locate the Start Mode option under the General group and set it to AlwaysRunning. Click OK.

Does restarting IIS restart app pool?

Compared to this, iisreset or restarting WAS causes the shutdown of ALL application pools. This includes waiting for requests in all application pools to finish, up to the shutdown time limit. This could mean up to a minute and 30 seconds of downtime from each application pool.


1 Answers

Reason:

IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When it says "not started" it mean you attempt to access some WCF web services (after iisreset) failed due to object was holding some space in memory, and you get a Service Unavailable error because the appPool cannot be started.

Workaround:

Create Batch file with following commands & schedule it.

net stop 23svc

net stop msftpsvc

net stop smtpsvc

net stop PleskControlPanel

net stop HTTPFilter

iisreset /restart

net start w3svc

net start msftpsvc

net start smtpsvc

net start PleskControlPanel

net Start HTTPFilter

like image 116
2 revs, 2 users 83% Avatar answered Oct 18 '22 04:10

2 revs, 2 users 83%