views:

2319

answers:

4

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?

+4  A: 

The application pools should restart on an iisreset, but they do run outside of iis (in COM+) for reliability. This mean they may may not come back if the application is misbehaving, but IIS and the other apps will(should) come back. So yes, This is "normal".

P.S. I would also like to "OUT" myself as a proud user of iisreset. Bad practice? Bah! ;D

Booji Boy
+3  A: 

IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When you say "not started", does it mean you attempt to access some WCF web services (after iisreset), and you get a Service Unavailable error because the appPool cannot be started? Do you see any IIS W3SVC related entries in the Event logs?

If there are, they may be able to clue you in why they cannot start; post them up here.

icelava
I get an "Service Unavailable" and a red cross through the pool in inetmgr, I didn't get a chance to see the event logs yet.
thijs
That is usually accompanied by error entries in the Event log; go check them out.
icelava
A: 

In a prior support role, I managed several IIS servers running all kinds of .NET mess. When an AppPool failed to start, it was usually a bad login credential.

spoulson
The pools can be started manually through inetmgr...
thijs
+1  A: 

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

Kalpesh D. Sampat