I checked it online, mainly because of the website Program Connected to the database Code If the connection fails to be closed in time, the connection to the database will peak and the connection to the database will no longer be connected. Therefore, IIS Reports Server too busy.
However, it is important to view the code. The key is to solve the problem of inaccessible in a timely manner, so we adopted the following solution:
1. First, ensure that the website can recover to normal immediately: A: Shut down the SQL database server and start it. B: restart IIS. After this operation, at least the website can be viewed immediately.
2. Reduce the cache for the IIS application pool. About MB. The traffic volume is 0.3 million daily. It should be 5 minutes to recycle. Avoid linking the database to the peak value.
3. Find the code that has not been disconnected and close the connection in time.
ASP. NET performance adjustment solves server too busy errors
An ASP.. net sites frequently encounter server too busy errors, such as slow page response and frequent server too busy exceptions. However, in fact, the server's resource consumption is very low, and the CPU usage is only about 10%, very strange.
The running environment of the site is Windows 2000, iis5.0, And. NET Framework 1.1. The site pressure is about 10 connections per second, and the peak value is about 30.
After looking for relevant information on the Internet, we can see from the display (slow response, throw the server Too Busy Exception) that the thread blocking caused by too many connections at the same time is preliminarily determined. After modifying the apprequestqueuelimit parameter in the httpruntime configuration section of Web. config, the server too busy error is solved. This parameter is inherited from machine. config by default. The default value is 100. If it is changed to 1000, the server too busy error will not appear.
Although the server is busy with errors, the site response is still slow. Sometimes it takes 5 to 10 seconds to open the page. The cause of the analysis should be that too many requests at the same time, but the IIS working thread is insufficient. The problem of slow site response speed is solved after the maxworkerthreads parameter in processmodel configuration section of machine. config is modified to 200. The default value of this parameter is 20, which can be adjusted based on the server hardware configuration.
The reason for this analysis is that the site program uses httpwebrequest to request the page of the external server, and this operation is quite time-consuming (the slow response of the external server is the main reason ). When a visitor's request reaches ASP. net working process, Asp. net will first check whether there are idle workerthreads. If there is any workerthread, it will be handed over to a idle working thread for processing. If there is no idle working thread, this request will be placed in the Request queue (requestqueue), and the response will be slow. When the request queue is full due to excessive traffic, ASP. NET throws the server Too Busy Exception. In. in NET 1.1, the default working threads and request queues are 20 and 100 respectively. When the Running code is time-consuming and the traffic is large, the default values are obviously too small. (The current server hardware is cheaper. Generally, the throughput of PC servers should be much higher than this value ). These two values can be reasonably configured based on the server pressure. To adjust the site throughput.
Httpruntime server too busy
modification method: Modify the server. net to configure "machine. config "file, which is located in the Windows System directory, such as" C: \ WINDOWS \ Microsoft. net \ framework \ v1.1.4322 \ config ", depending on your network disk program version, modify the machine in the corresponding directory. the config file. For example, in version 2.0, you can modify "C: \ WINDOWS \ Microsoft. machine under net \ framework \ v2.0.50727 \ config. in the config file, find the "processmodel" configuration section in the file and modify the field maxworkerthreads = "200" maxiothreads = "200". The default sections of 1.1 and 2.0 are not the same, the modified configuration is as follows:
1.1: copy Code the code is as follows: enable = "true"
timeout = "infinite"
idletimeout = "infinite"
shutdowntimeout = "0:00:05"
requestlimit =" infinite "
requestqueuelimit =" 5000 "
restartqueuelimit =" 10 "
memorylimit =" 60 "
webgarden =" false "
cpumask =" 0 xffffffff "
username =" machine "
Password =" autogenerate "
loglevel =" errors "
clientconnectedcheck =" 0:00:05 "
comauthenticationlevel = "Connect"
comimpersonationlevel = "Impersonate"
responsedeadlockinterval = "00:03:00"
maxworkerthreads = "200"
maxiothreads = "200"
/>
Version 2.0:
the original default value is
changed to
no need to restart the server can see the effect.
the above is my personal experience. My server status is 2003 operating system.