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
& Nbsp; idle timeout for 20 minutes :( optional)
& Nbsp; Request queue restrictions: (not selected)
& Nbsp; the maximum number of worker processes in the Web garden is 1 (default ).
Iii. Running status
& Nbsp; Enable Ping: Selected
& Nbsp; enable quick failure protection: Optional.
& Nbsp; Start Time Limit: 900 seconds
& Nbsp; close 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. The solution is as follows:
Internet Information Service (IIS) Manager-> application pool-> defaultapppool-> right-click attribute 1, recycle 1, recycle workflow (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 recycle process when the traffic is high, leading to false IIS response failure)
2. Only idle timeout for 20 minutes is selected for performance. 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, in this case, the process shutdown time exceeds the limit log. Therefore, extend the time to avoid this error.
The server frequently generates the "application pool 'defaultapppool 'to provide services. The process shutdown time exceeds the limit. The process ID is '000000 ′." The IIS is in the suspended state. It is known that it is a problem in setting the IIS application pool. The solution is as follows:
Internet Information Service (IIS) Manager-> application pool-> defaultapppool-> right-click Properties
I. Recycling
1. Recycle Working Process (minutes): Selected; Value: 1740
2. Reclaim the Working Process (number of requests): No (originally set to 35000)
3. Reclaim the working process at the following time: do not fill in
4. Process recycling 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 recycle process when the traffic is high, leading to false IIS response failure)
Ii. Performance
Only idle timeout for 20 minutes is selected. 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.
Iii. Running status
The first two items are used by default. 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.
2nd methods:
Cause: the memory heap quota of independent processes is exhausted, and IIS cannot create more process workspaces for processing.
Solution:
1. HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W3SVC
2. Create a New DWORD under the Parameters key. The name is usesharedwpdesktop and the value is 1. Restart IIS.
3rd types
The problem has been solved and the database connection cannot be released. I don't know why. The same code is good locally and there is a problem on the server, finally, add the following statement to the connection string to solve the problem.
Pooling = true; Max pool size = 512; min pool size = 50; connection lifetime = 30
4th types
Create an application pool. different websites reference different application pools.