10

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?

alexandrul
  • 12,856
  • 13
  • 72
  • 99
thijs
  • 3,445
  • 1
  • 27
  • 46

6 Answers6

11

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
  • 4,522
  • 4
  • 40
  • 45
5

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
  • 9,787
  • 7
  • 52
  • 74
  • 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 Oct 29 '08 at 13:46
  • That is usually accompanied by error entries in the Event log; go check them out. – icelava Oct 30 '08 at 03:46
4

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

Community
  • 1
  • 1
3

Had similiar issue - after IIS has been restarted, DefaultAppPool was stopped.

In application event logs found an error:

Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly. If this problem persists, contact your network administrator.
DETAIL - Access is denied.

Fixed by setting in DefaultAppPool Advanced Settings option Load User Profile to False.

Hope it could be usefull.

Fragment
  • 1,555
  • 1
  • 26
  • 33
0

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
  • 21,335
  • 15
  • 77
  • 102
-1

Re-setting the identity (auth credentials) via advanced settings of the Application pool worked for me.

Earlier I changed my active directory password and as the app pool was already running, it worked fine until I performed IISRESET.

Nitinkumar
  • 19
  • 8