IIS 7 application Pool Auto Recycle shutdown solution

Source: Internet
Author: User
Tags time interval

If you're doing asp.net, it's definitely going to use IIS.

If you want to add a timed task to the ASP.net application, you must be using a thread to do the timed calculation continuously

Let's assume that we've added the quartz.net framework to our ASP.net application and that the configuration and so on are OK.

This site a small number of visits, now only a few people to work only then use, the results of the next day to see, the background scheduling of the thread and computing tasks are stopped, if you crawl the Application_End event, you will find this incident incredibly called.


That must be the mechanism of application pool recycling for IIS. Because of the default settings for IIS, if a site is in an application pool that has not been accessed or requested for more than a period of time, IIS automatically reclaims the program pool and kills the process. The threads in the process are certainly not going to survive.


But we can set the application pool parameters so that it will not be automatically recycled (some cases can not be avoided, such as hot-deployed sites, error number overrun, etc.)


In IIS, find the program pool used in this site, click "Advanced Settings ..."

In the open list, change the following settings:

Recycle--Fixed time interval (minutes) is changed to 0

--Virtual/private memory limit (KB) to 0

Process Model-idle timeout (minutes) to 0


This way, in general, the program pool will not be automatically recycled, the background of some simple calculation thread will work properly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.