0

I had my 'Timeout limit' set to 5 minutes on the app pool for my site.

I noticed that it was frequently stopping and restarting. Shortly after the app pool restarts the w3svc.exe starts with strange behaviour where the CPU shoots up and down from between 0 and 100%.

Before the CPU begins shooting up and down the app is accessible from the browser, so its as if the app is already 'running' so I perceive it as started... If that means any thing.

I was panicking initially when I saw it as I feared it might be the code in my C# ASP.NET MVC app, but then I realised that this calms down after about 5 minutes of shooting up and down and the memory and CPU usage returns back to an acceptable state.

I've set my timeout on the app pool to 0 to prevent it from frequently entering this cycle, but I'm not exactly sure what its doing so I'd like to fine tune it.

I've been looking up things to do with caching as I fear that the server might be caching my entire /Content folder which contains several thousands of images.

Luke
  • 22,826
  • 31
  • 110
  • 193

1 Answers1

1

The default application pool timeout is 1740 (29 hours). It is normal for an application pool to require resources for a few minutes when it starts or recycles. However, if you set it to something as low as 5 minutes, it may be recycling before the warm-up process is finished, so it is perpetually eating up resources.

I am not sure what you hope to gain by setting the application pool to recycle every 5 minutes, but both in-process session state and cached items that are not specified as "not removable" will be reset every time the pool restarts, which will cause other issues if your application depends on them.

The application pool has nothing at all to do with server-side caching. And unless you have explicitly written code to cache them, images are normally cached on the client, which doesn't eat up resources on your server.

That said, proper use of caching is something that will improve a web server's performance, not hinder it.

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
  • Thanks for taking time to reply! I notice within my app pool's settings that the `Regular Time Interval (minutes)` option is indeed 1740, but for `Idle Time-out (minutes) it is set to only 5 minutes. So that's the option that I've been setting to 0. – Luke Feb 15 '15 at 23:22