Online check, the cause is mainly due to the Web site program in connection with the database code did not close in time caused, so many links after the link to the database to reach peak, can not connect to the database, so IIS reported to the server too busy.
Problem:
What does the Server is too busy mean and how to solve it?
Reply:
First of all, literally, we can see:
Server is too busy = Server busy
So how should this situation be resolved? There are two types of situations:
1, if you are a visitor, then please contact the site management (consultation or inform the question), or perhaps you visit the time of the site traffic is larger, you can choose to try again!
2, if you are a webmaster, your own site This situation, please refer to the website Service Unavailable solution. In addition, you can also review some of the optimization methods for the virtual host or the server is too busy under IIS.
In general, when your IIS has an error such as "http:1001 server is too busy", It's because you have too many Server.CreateObject requests in your ASP program, and then every request needs to be queued up until they are actually built.
If your queue has a maximum length of 500, when 499 requests already exist in the queue, then if the NO. 500 request arrives, the "server is too busy" error occurs.
So how do you minimize the requests that are being requested, and how to improve response time, here are a few suggestions:
1. Use the. htm suffix files to avoid the use of. asp (especially when special events are likely to be used to overload the condition). Because the HTM does not plug the server at the same time can get maximum cache performance. (I have introduced an article on the efficiency of this issue, in the essence of the area)
2. Try to use less server.createobject in your ASP
3. Strictly limit your ASP calls to external resources that are not on your server, such as your resources on another server
4. Try to optimize your network performance and stability, such as enhancing your background SQL Server database or remote file sharing LAN performance.
5. Try to make each component fast and call it speed. For example, if a component is called 20 times a second, it must be completed in 1/20 seconds or the component will block. You know, a blocked component will cause all the ASP crashes on your site
6. Monitor the performance status of your site every week, because a single object that can cause a blockage can have a bad effect on your entire site.
But looking at the code is important, the key is to resolve the problem in a timely manner, and then take the following solution:
1. First of all ensure that the site can be restored to normal in the first time: A: The SQL database server shutdown, in the boot. B: Restart IIS. After this operation, you can at least ensure that the site can be browsed at once.
2. Reduce the recycle memory of the IIS application pool. See About 200MB. The number of visits is in the case of 300,000 per day. It's supposed to be recycled in 5 minutes. Avoid linked database links to large spikes.
3. Find code that is not disconnected, and close the connection in a timely manner.
Asp. NET Performance Tuning solution Server Too Busy error
Recently, a company asp.net site frequent server Too busy error, the specific performance of the page response is slow, often appear server Too busy exception, but in fact, the server resource consumption is very low, CPU use only about 10%, very strange.
The site is running in Windows 2000,iis5.0,.net Framework 1.1, and site pressure is about 10 connections per second, at a peak of about 30.
After looking up the relevant data from the Internet, from the display of the situation (slow response, throw out the server Too busy exception), preliminary judgment for too much concurrent connection caused by thread blocking. The Server Too Busy error was resolved after modifying the appRequestQueueLimit parameters in the httpruntime configuration section in Web.config. This parameter is inherited from Machine.config by default, and the default value is 100, and the server Too busy error is no longer present when changed to 1000.
Although the server is busy with the error resolved, but the site response is still very slow, sometimes it takes 5-10 seconds to open the page. The reason for the analysis should be that too many concurrent requests, and the reasons for the insufficient IIS worker threads, the modification of Machine.config processmodel configuration section maxWorkerThreads parameter is slow after 200 site response is resolved. The default value of this parameter is 20, which can be adjusted to the pressure size according to the server hardware configuration.
The reason for this is that the site program uses a page that HttpWebRequest requests external servers, and this is a time-consuming operation (the main reason for the slow response from the external server). When the visitor's request arrives at the ASP.net worker process, asp.net first checks to see if there is a free worker thread (workerthread), which, if any, is given to an idle worker thread, and if there is no idle worker thread, the request is placed in the request queue (Requestqueue In this time, the performance is slow response. When the traffic is too large to cause the request queue is full, ASP. NET throws the server Too busy exception. In. NET 1.1, the default worker and request queues are 20 and 100, which are obviously too small when the code that runs is more time-consuming and has a larger amount of traffic. (now the server hardware is cheap, the general PC server throughput should be far more than this number). These two values can be configured reasonably according to the server pressure size. To adjust site throughput.
HttpRuntime Server Too Busy
Modify method: Modify the server. NET configuration "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 web version, modify the corresponding directory of Machine.config files, such as 2.0 version of the user to modify the "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG" Machine.config file, look for the "ProcessModel" configuration paragraph in the file, modify the fields maxworkerthreads= "200" maxiothreads=, The default paragraphs for 1.1 and 2.0 are not the same, and the modified configuration is as follows:
1.1 Version:
Copy Code code as follows:
<processmodel
Enable= "true"
timeout= "Infinite"
idletimeout= "Infinite"
shutdowntimeout= "0:00:05"
requestlimit= "Infinite"
requestqueuelimit= "5000"
restartqueuelimit= "10"
memorylimit= "60"
Webgarden= "false"
cpumask= "0xFFFFFFFF"
Username= "Machine"
Password= "AutoGenerate"
Loglevel= "Errors"
clientconnectedcheck= "0:00:05"
Comauthenticationlevel= "Connect"
Comimpersonationlevel= "Impersonate"
Responsedeadlockinterval= "00:03:00"
maxworkerthreads= "200"
maxiothreads= "200"
/>
2.0 Version:
The original default is <processmodel autoconfig= "true"/>
Change to <processmodel maxworkerthreads= "maxiothreads="/>
You can see the effect without restarting the server.
The above is only personal experience, my server status is: 2003 operating system,