Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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

share|improve this answer
    
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 '10 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 '10 at 2:01

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.