2

I host an asp.net website on an IIS server, and I find that the website will be slow to be displayed when the website has not been accessed for a long time.

Does IIS suspend websites that have not been accessed for a long time?

voretaq7
  • 79,879
  • 17
  • 130
  • 214
Paul
  • 47
  • 1
  • 6

2 Answers2

3

It depends on how the application pool the site is running in is configured, but yes. IIS can shut down an app (ie- recycle the worker process(es)) that has not had any activity for X amount of minutes (X is configurable). It's also possible to recycle based on memory consumption, CPU consumption, after a certain number of requests are served, based on a schedule, or programatically.

squillman
  • 37,883
  • 12
  • 92
  • 146
  • Thanks! How can I set X amount of minutes for a website in IIS? And more, I meet the same case in sql server 2008 express, how can set X amount of minutes for sql server 2008 express? – Paul Jan 13 '12 at 15:22
  • What version of IIS? Also, please post the SQL Server question as a new question. They're completely unrelated. – squillman Jan 13 '12 at 16:05
  • The version of IIS is 7.0. How can I set "X amount of minutes" for a website in IIS? Thanks – Paul Jan 14 '12 at 09:00
0

By default, IIS 6 and above have an Idle Timeout property configured for Application Pools.

If an Application Pool hasn't been used for 20 minutes (by default), it'll be shut down.

If it's under more load than 1 request every 20 minutes, it'll eventually recycle (by default) after 29 hours.

If you'd like to stop a particular App Pool (in IIS7+, each Website also gets its own App Pool created by default if the site is created through the GUI) shutting down every 20 minutes, get the App Pool properties, and check out either Recycling... in IIS 7, or the Health tab in IIS 6.

TristanK
  • 9,073
  • 2
  • 28
  • 39