简体   繁体   中英

Can IIS AppPool be unavailable due to idle?

I have a ASP.NET application running on IIS 8. My application sometimes does not respond to request with clients logging a timeout and then IIS starts sending out 503 Unavailable response codes. Each outage seems to last 5 minutes which corresponds to a 5 minute limit interval for Kill w3wp. I have the App Pool configured for a Kill w3wp limit action with limit percentage of 80%.

While it might seems the pool is getting killed due to high CPU usage, I could not find any records in the event viewer. In fact, it had gone to idle state because of no requests in about 25 minutes.

The crash happened with 3 simple identical requests issued when the pool was idle.It cannot be reproduced manually in any environment.

This is happening about once a week. Since its a critical application, its running on a separate server with no other applications installed.

I have changed the Limit from Kill to throttle but I am not sure its a good idea. Anyways I've got to find a way to reproduce this.

Can the pool fail to exit an idle state?

If there is no traffic, w3wp.exe may go idle aka stop running. But that is not the same as it being truly stopped and it would not cause a 503. It would just start back up on the next request.

A 503 is more likely because your IIS App Pool is crashing or literally being stopped.

I would check Windows Event Viewer to see if says anything around that time frame around w3wp crashing. You can also set IIS to do more detailed logging anytime your w3wp app pool is stopped, started, recycled.

Docs about enabling more app pool logging: https://technet.microsoft.com/en-us/library/cc753412%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

You could also search various IIS logs for errors:

https://stackify.com/beyond-iis-logs-find-failed-iis-asp-net-requests/

If you set auto recycle option then remove it and make it schedule recycle instead.

It seems as the memory consumption by your application tends to saturation level, IIS being recycled

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM