2

Running IIS 6 on Windows Server 2003 Web.

We have some 3rd party components that leak memory so we've scheduled periodic jobs to restart IIS. The jobs are simply calling iisrestart /reset which seems to do the job... but it sure generates a big ol' pile of Event log events -- including 3 errors and a warning. Perhaps we're doing it wrong?

Is there a "cleaner" way to recycle the IIS process(es) without Windows getting all upset with us? As our monitoring improves, error events on the prod web servers cause unnecessary distractions.


For those curious, here's what the events "cycle" looks like (I've abridged the description text a bit for brevity). These all happen in a span of 1 - 2 seconds:

Warning - WinRM - ID 10149 - WinRM service is not listening for WS-Management Requests

Info - IISCTLS - ID 6 - IIS Reset encountered an error while stopping services

Info - Service Control Manager - ID 7035 - SMTP service was successfully sent a stop control

Info - Service Control Manager - ID 7035 - Windows Remote Management Service successfully sent a stop control

Info - Service Control Manager - ID 7036 - Windows Remote Management entered stopped state

Error - Service Control Manager - ID 7034 - World Wide Web publishing service terminated unexpectedly. It has done this x times

Error - Service Control Manager - ID 7034 - IIS Admin Service terminated unexpectedly

Error - Service Control Manager - ID 7034 - SMTP service terminated unexpectedly

Info - IISCTLS -ID 4 - IIS kill command received from user.

Info - IISCTLS - ID 2 - IIS stop command received from user.

Info - Service Control Manager - ID 7035 - IIS Admin Service service was successfully sent a start control

Info - Service Control Manager - ID 7035 - World Wide Web Publishing Service service was successfully sent a start control

Info - Service Control Manager - ID 7035 - SMTP service was successfully sent a start control

Info - Service Control Manager - ID 7035 - Windows Remote Management service was successfully sent a start control

2 Answers 2

5

Are you running IIS in worker process isolation mode? If so, a better solution would be to use the application pool recycling features. You can put the offending application into its own pool, then restart only its process based on various criteria (every X minutes, or when memory usage reaches Y megabytes, or when you have Z requests to the app, etc.)

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/003ed2fe-6339-4919-b577-6aa965994a9b.mspx?mfr=true

2
  • Oh geeze... We started the iisrestart method back in IIS 5 days. I guess I never thought to look closer at the App Pools! Thanks for that clue-by-four.
    – Chris_K
    Feb 8, 2010 at 18:58
  • The link was helpful, thank you. I'll be trying out the app pool restart scheduler to see how that works for us. Or I could try the /noforce argument to iisrestart... One of those.
    – Chris_K
    Feb 9, 2010 at 2:01
1

MattB answer is best (IMO), another option is to kill the Application Pool process.

This requires a bit more work because you have to:

  1. Determine the PID of the Application Pool you want to kill.
  2. Kill the PID

However this does not do a recycle of the entire IIS Service (which is what is generating the messages in your log).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .