The process to service the application pool ' DefaultAppPool ' has been closed for more than a limited time
The server often generates the "Application pool ' DefaultAppPool" process that provides service shutdown times beyond the limit. The process ID is ' 2068 '. "Error, which causes IIS to be in suspended animation state, is known to be a setup issue for the IIS application pool. The workaround is as follows:
Internet Information Services (IIS) Manager-> Application pool->defaultapppool-> right-click Properties
First, recycling
1, recycling worker process (minutes): checked, the value is 1740
2, recycling worker process (number of requests): Not selected (originally set to 35000)
3, in the following time to recycle work process: not fill
4, consume too much memory when recycling worker process: all do not choose. (2, 3, 4 items may avoid server response problems that might be caused by a forced recycle process when the traffic is high, causing IIS to feign death without responding)
Second, performance
Select only idle timeout of 20 minutes. No other choice. The maximum number of worker processes in the Web garden is 1 (default). Note that the Web garden must remain the default, if you fill in more than 1 of the number will cause some Web site program background program can not open or refresh non-stop.
The original request queue is limited to 4000 and is now unrestricted.
III. Operational Status
The first two items are used, which is the original default setting. The start time limit is 90 seconds and the shutdown time limit is 180 seconds.
Start quick fail protection with hooks removed!
In order to avoid really encountering a lot of errors without prompting, you can not close, just the protection of the rapid protection of the scope of more, such as the failure of 50 times a period of 5 minutes to close the corresponding program.
"Closing time limit of 180 seconds" is a must, because the process shutdown time, originally a 90-second limit, is the default value, if the process shutdown time of more than 90 seconds, it is considered timeout, resulting in: Process shutdown time exceeded the limit log, so the appropriate extension of this time, you can avoid this error
The 2nd method:
Reason: The memory heap 戋 of the standalone process is exhausted, and IIS cannot create more process workspaces to handle
Workaround:
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC
2. Under the Parameters key to create a new DWORD entry, the name is: Usesharedwpdesktop value of 1 restart IIS
3rd Kind
The problem has been resolved, found that the database connection can not be released, do not know what the reason, the same code in the local is good, there are problems on the server side, and finally in the connection string to add the following statement to solve the problem.
Pooling=true; MAX Pool size=512; Min Pool size=50; Connection lifetime=30
4th Kind
Create a new application pool, and different Web sites refer to different program pools.
The following are additional users:
"The application pool ' AppPool #1 ' the service-servicing process has been shut down for more than a limit" error occurs because the Web site has too many traffic connections, when the application pool handles the connection, the new ones are not replaced, and the old ones are recycled, but not in time for the recycling process, This error occurs when the application pool is as usual and the Web site is inaccessible.
When the site is not accessible, manually recycle the application pool, you can restore, but manually recover, after all, it is troublesome, you can not stare at this site all day to see it? If the problem is with the application pool, we'll look at the configuration of the application pool to see if it solves the problem.
1, the first recommendation of each site to establish an application pool, an application pool will correspond to the different w3wp.exe process, the "command Prompt" under the use of Iisapp command can see the site corresponding to the W3wp.exe PID value, easy to find the problem of the process.
2, the application pool configuration
Personal opinion the configuration of the Recycle and Health 2 tabs is more important in the Properties window of the application pool.
2.1. Recycle tab
1. Recycle worker process (minutes): Recycle worker process after how many minutes the worker process is running, enabled by default, and set to 1740 minutes (29 hours);
2. Recycle worker processes (number of requests): Terminate this worker process after the worker process has processed the number of HTTP requests, by default, or 35000 if enabled;
3, the following time to recycle the work process: The specified time to recycle the worker process, the default is disabled, if you want to enable, check after the Click Add button to add recycled time, use a 24-hour system to define the time of recycling;
4. Recycle worker process when too much memory is consumed:
Maximum virtual memory (Mega): Reclaims worker processes when the virtual memory used by the worker process reaches the set value, which is disabled by default, and is recommended to be set to no more than 70% of the total virtual memory;
Maximum memory (trillion): Reclaims worker processes when the physical memory used by the worker process reaches the set value, which is disabled by default, and if enabled, the default value is M; The recommended setting is 60% of the total physical memory;
2.2, performance
1. Close worker process after idle time (minutes): Shut down this worker process when the worker process is idle for a few minutes, which reduces the consumption of system resources and CPU performance by the idle worker process, which is enabled by default and is set to 20 minutes;
2, The core request queue is limited to (number of requests): When HTTP.sys receives an HTTP request sent by a client, if the worker process of the corresponding application pool that handles the request is still busy, HTTP.sys holds the received request in the corresponding application pool's request queue until the worker process is idle. This option is used to set the number of requests that can be accommodated by the request queue for this application pool, by default, the request queue for each application pool is limited to 1000 requests, and if a 503 error is returned to the client if it is exceeded, you can modify it as appropriate, with a maximum setting of 65535. However, if the setting is too large, it consumes a lot of system resources, and setting too small can cause frequent 503 errors during client access.
2.3. Operation condition
1. Enable Ping: By default, the application pool is configured to ping the worker process every 30 seconds, and when the worker process does not respond, it is considered to be a failure and is configured to close the worker process by default. You can modify the interval of the ping, but too long ping interval may cause the interruption of the Web service, and too short ping interval will consume more system resources and CPU utilization, so it is recommended that you keep the default configuration;
2. Enable fast fail protection: if there is a problem with the Web application code writing, it may cause the worker process to continue to experience problems. By default, the application pool is configured to enable fast fail protection, which disables this application pool when the number of failures that occur within the configured time period (the default is 5 minutes) exceeds the configured value (default is 5).
3. Startup time limit: IIS waits for the start of a worker process that belongs to this application pool, and IIS records in the event log when the worker process is enabled beyond this setting value;
4. Shutdown time limit: When IIS detects a worker process failure, it marks the worker process as closed, which specifies the time limit for IIS to wait for the worker process to shut down automatically, and if the worker process has not been closed since the time limit is exceeded, IIS forces the worker process to close.
There are different settings for different situations,
[Reference: Workaround for IIS recycling worker processes
First Solution:
IIS6 system default Worker process recycle time is 29 hours there are a number of issues that occur after the Recycle worker process has many problems such as typical 500 errors after I do a period of observation of the server you can adjust the maximum memory of the application pool to a suitable value instead of recycling the worker process. Because if you set up a worker process that does not recycle, the memory footprint of this application pool will be large and in a short increase, we set the maximum memory size of this pool to control the program changes in this application pool in a reasonable value
The second workaround:
IIS6 application pools often cause problems
[Check the system log for errors found below]
The process to service the application pool ' DefaultAppPool ' has been shut down for more than a limited time. The process ID is ' 3484 '.
[followed by]
The description of the event ID (54) (in Resources (HTTP)) cannot be found. The local computer may not have the necessary registration information or a message DLL file to display messages from a remote computer. You may be able to use the/auxsource= identity to retrieve word descriptions, and to view Help and support for more information. The following information is part of the event:/device/http/apppool.
Online Search a lot of information, say that the application pool can not be recycled within a specified time. The appropriate extension time can be resolved, at the beginning I set to 10 minutes must be recycled. But the problem remains. Helpless had to shut down the recycling, the result of not recycling is the memory is not released, a manual recycling program pool and observe the process dynamics, let me suddenly understand the truth.
Each program pool has a separate process w3wp.exe, and in the recycle pool, the system creates a new w3wp.exe process for processing new Web requests, which slowly frees up the old process. If the old process has not been released in the specified time, it can cause a program pool error.
So, set the time to a longer line, I set it to 3,600 seconds, that is, an hour. After setting up the program pool has not been a problem, every day to observe the server, memory can be very good release.
The following is my program pool settings, for reference only.
Right-click the application pool DefaultAppPool and select Properties:
First, recycling
1, recycling work process (minutes): (not selected)
2. Recycle worker process (number of requests): (not selected)
3, in the following time to recycle the work process: I set to 3 o'clock in the morning, because at that time the least traffic, request the fewest, easier to release resources.
4. Recycle worker process when consuming too much memory: (not selected)
Second, performance
Idle timeout 20 minutes: (not optional)
Request Queue restrictions: (not optional)
The maximum number of worker processes in the Web garden is 1 (default).
III. Operational Status
Enable Ping: Select
Enable fast Fail protection: not selected.
Start time limit: 900 seconds
Shutdown time limit: 3,600 seconds.
The third solution:
Because the application pool DefaultAppPool the process that provides the service to shut down time exceeds the limit when the server often generates the process of "application pool DefaultAppPool service delivery." The process ID is 2068. "Error, which causes IIS to be in suspended animation state, is known to be a setup issue for the IIS application pool. The workaround is as follows: Internet Information Services (IIS) Manager-> Application pool->defaultapppool-> Right-click Property One, Recycle 1, recycle worker process (minutes): checked, value 17402, Recycle worker processes (number of requests): Do not select (originally set to 35000) 3, recycle worker processes at the following time: Do not fill in 4, consume too much memory to recycle worker process: all do not choose. (2, 3, 4 items may avoid server response problems that might be caused by a forced recycle process when the traffic is high, causing IIS to suspend death from being unresponsive) two, performance only select the idle timeout of 20 minutes. No other choice. The maximum number of worker processes in the Web garden is 1 (default). Note that the Web garden must remain the default, if you fill in more than 1 of the number will cause some Web site program background program can not open or refresh non-stop. The original request queue is limited to 4000 and is now unrestricted. Third, the health of the first two items are used, is the original default settings. The start time limit is 90 seconds and the shutdown time limit is 180 seconds. Start quick fail protection with hooks removed! In order to avoid really encountering a lot of errors without prompting, you can not close, just the protection of the rapid protection of the scope of more, such as the failure of 50 times a period of 5 minutes to close the corresponding program. "Closing time limit of 180 seconds" is a must, because the process shutdown time, originally a 90-second limit, is the default value, if the process shutdown time of more than 90 seconds, it is considered timeout, resulting in: Process shutdown time exceeded the limit log, so the appropriate extension of this time, you can avoid this error
]
The method given in this Bovenri is a good solution, but for my server, can not solve the problem, my site because there is a voting system, someone to brush the ticket, this kind of brush ticket behavior is uncertain, when a large number of visits, resulting when the machine, do not brush when the server does not flow, So the method it mentions is not very suitable for my server.