The process in which the application pool provides services has been shut down for more

Source: Internet
Author: User

The error "the closing time of the process that provides services for the application pool 'apppool # 1' exceeds the limit" is caused by a large number of accesses to the website, when the application pool processes the connection, the new one has not been replaced, but the old one has to be recycled, but it is not timely in the recycling process. As usual, the application pool is used as the machine, this error occurs when the website cannot be accessed.

When the website cannot be accessed, You can manually recycle the application pool to restore it. However, manual recovery is very troublesome. You cannot stare at this website all day? If the problem lies in the application pool, we can check whether the problem can be solved by configuring the application pool.

1. First, we recommend that you create an application pool for each website. An application pool will correspond to different w3wp.exe processes. You can use the iisapp command at the "command prompt" to check the PID value of w3wp.exe on the website for troubleshooting.

2. Application pool Configuration
In my opinion, the configuration of the "recycle" and "running status" tabs is important in the Properties window of the application pool.

2.1 recycling Tab

1. Recycle A Worker Process (minutes): the number of minutes after which the worker process will be recycled. This function is enabled by default and set to 1740 minutes (29 hours );
2. reclaim a working process (number of requests): The number of HTTP requests processed by the working process before terminating the working process. disabled by default. If enabled, the default value is 35000;
3. Recycle the worker process at the following time: Recycle the worker process at the specified time. disabled by default. To enable it, select the check box and click Add to add the recycle time, use 24 hours to define the time for the rollback;
4. Reclaim the worker process when too much memory is consumed:
Maximum virtual memory (MB): The worker process is reclaimed when the virtual memory used by the worker process reaches the set value. The default value is 500 mb if enabled; we recommend that you set it to no more than 70% of the total virtual memory;
Maximum memory used (MB): The worker process is reclaimed when the physical memory used by the worker process reaches the set value. The default value is 192 MB if enabled; we recommend that you set it to 60% of the total physical memory size;

2.2 Performance

1. Shut down the working process (minutes) after idle for this period of time: How many minutes after the working process is idle, this reduces the consumption of system resources and CPU performance by idle working processes. It is enabled by default and set to 20 minutes;

2. The core Request queue is limited to (number of requests): When HTTP. when sys receives an HTTP request from a client, if the worker process of the corresponding application pool processing the request is still busy, HTTP. sys stores the received requests in the Request queue of the corresponding application pool until the worker process is idle. This option is used to set the number of requests that the request queue of this application pool can accommodate. By default, the request queue of each application pool is limited to 1000 requests, if the number exceeds 503, the system returns the 65535 error to the client. You can modify the value as needed. The maximum value is. However, setting too large will consume a lot of system resources, and setting too small will cause frequent 503 errors during client access.

2.3. Running status

1. Enable Ping: by default, the application pool is configured to ping the worker process every 30 seconds. When the worker process does not respond, it is deemed that the working process has a fault and is disabled by default. You can modify the ping interval, but too Long Ping interval may cause web service interruption, and too short Ping interval will consume more system resources and CPU utilization, therefore, we recommend that you retain the default configuration;
2. enable quick failure protection: if there is a problem with the Web application code writing, it may cause the worker process to continue to have problems. By default, the application pool is configured to enable quick failure protection. When the worker process is configured for a period of time (5 minutes by default) if the number of failures in the application exceeds the configured value (5 by default), the application pool is disabled.
3. Start Time Limit: IIS waits for the start time of a worker in the application pool. When the start time of a worker exceeds the set value, IIS will record it in the event log;
4. Closing time limit: When IIS detects a worker process failure, it marks the worker process as disabled. This option specifies the time limit for IIS to wait for the Worker Process to automatically close, if the worker process is not closed after the time limit is exceeded, IIS forcibly closes the worker process.

Different settings are available in different situations,

[Reference: how to solve an error when IIS recycles a Working Process

Solution 1:

IIS6's default working process recovery time is 29 hours. Many problems occur after the process is recycled, such as the typical 500 error. After I am working on the server for a while, I will observe you. you can adjust the maximum memory usage of the application pool to a proper value instead of recycling the working process, because if a worker process is set to not be recycled, which application pool will occupy a large volume of memory and increase in size, we set the maximum memory usage of this pool to control the application pool program changes in a reasonable value.

 

Solution 2:

IIS6 application pool may frequently encounter problems

[The following error will be found when you view the system log]

The closing time of the process that provides services for the application pool 'defaultapppool 'exceeds the limit. The process ID is '20140901 '.

[What follows is:]

The description of event ID (54) (in resource (HTTP) cannot be found. The local computer may not have the necessary registration information or message DLL file to display messages from the remote computer. You may use the/auxsource = identifier to retrieve the word description. View help and support for more information. The following information is part of the event:/device/HTTP/apppool.

I checked a lot of information online, mostly because the application pool cannot be recycled within the specified time. You can solve the problem by extending the time. At first, I set it to be recycled within 10 minutes. But the problem persists. Instead, I had to close the recycle. The result was that the memory could not be released. I had to manually recycle the pool and observe the Process dynamics, So that I suddenly understood the truth.

Each program pool has an independent process w3wp.exe. In the recycle pool, the system will create a new w3wp.exe process to process new Web requests and release old processes slowly. If the old process is not released within the specified time, an error occurs in the program pool.

So, set the time to a long point. I set it to 3600 seconds, that is, an hour. After the settings, the program pool has never encountered any problems. Every day, the server is observed and the memory can be properly released.

The following is my program pool settings for your reference only.

Right-click the application pool defaultapppool and select properties:

I. Recycling

1. Reclaim the Working Process (minutes): (No)

2. Reclaim the Working Process (number of requests): (not selected)

3. Process recycling at the following time: I set it to AM, because at that time the traffic was the least, the request was the least, and the resources were easier to release.

4. Reclaim the working process when too much memory is consumed: (optional)

Ii. Performance

Idle timeout 20 minutes: (No)

Request queue restrictions: (not selected)

The maximum number of worker processes in the Web garden is 1 (default ).

Iii. Running status

Enable Ping: select

Enable quick failure protection: No.

Start time limit: 900 seconds

Closing time limit: 3600 seconds.

Solution 3:

Because the application pool defaultapppool provides service process shutdown time exceeds the limit, the server often produces "application pool defaultapppool provides service process shutdown time exceeds the limit. The process ID is 2068 ." The IIS is in the suspended state. It is known that it is a problem in setting the IIS application pool. Solution: Internet Information Service (IIS) Manager-> application pool-> defaultapppool-> right-click attribute 1, recycle 1, recycle Working Process (minutes): Select, the value is 17402, And the recycle Worker Process (number of requests) is not selected (originally set to 35000). 3. Recycle the worker process at the following time: do not fill in. 4. Recycle the worker process when too much memory is consumed: all are not selected. (Items 2, 3, and 4 may avoid server response problems that may be caused by the forced recycling process when the traffic is high, resulting in the failure of IIS to respond) 2. Select idle timeout for only 20 minutes. None of them. The maximum number of worker processes in the Web garden is 1 (default ). Note that the Web Garden must be kept by default. If you enter other numbers greater than 1, the background programs of some website programs cannot be opened or refresh continuously. The original request queue is limited to 4000, But not limited now. 3. The first two items of the running status are used, which is the original default setting. The startup time is limited to 90 seconds, and the shutdown time is limited to 180 seconds. Remove the hook for enabling the quick failure protection! In order to avoid having to ignore the prompt when many errors are encountered, you can just increase the protection scope of quick protection. For example, if the failure occurs for 50 times for five minutes, you can close the corresponding program. The "Closing time limit is 180 seconds" is required. Because the process closing time is originally 90 seconds, it is the default value. If the closing time of a process exceeds 90 seconds, it is deemed to have timed out, this error occurs when the process shutdown time exceeds the limit log. Therefore, extend the time to avoid this error.

]

The methods provided in this blog post are some good solutions, but for my server, they cannot solve the problem. My website has a voting system, and some people are paying for it, this type of ticket swiping behavior is uncertain from time to time. When it comes, a large amount of access causes the server to have no traffic when it is not flushed, so the method it mentioned is not very suitable for my server.

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.