Why does the website sometimes appear "Service unavailable" hint?

Source: Internet
Author: User
Tags memory usage system log
Q: Why my site sometimes appears "Service unavailable" prompts, refresh a few times can also visit.

A: This situation occurs because your Web site exceeds the system resource constraints, mainly because the traffic is too large or the program occupies too much resources.
1. Too much traffic
For example, you buy a b002-type base host, the host's rated flow is 15g/month. If your site monthly traffic in 15G, daily traffic below 0.5G, you should be able to access the normal. If the number of consecutive days of traffic increases, the flow of more than 0.5g/days, then the host is overloaded operation. Overload operation, there will be sometimes normal access, sometimes by the system automatically stop (Service unavailable) situation. The solution is: first login to the virtual Host Management Center to see the recent access statistics and traffic statistics, to see if there is an abnormal increase in traffic, and sometimes the individual RAR or MP3 files in the site by other sites hotlinking, it will occur dozens of times times the increase in traffic. The log download function and the "File category" feature in the access statistics provided by us are analyzed to determine whether there is a hotlinking or a large number of downloads. If the traffic is growing naturally, the purchased model does not meet the requirements, then the virtual host model needs to be upgraded to get more traffic quotas.
2. The program consumes too much resources
For example, the same 100-person online forum, the Forum is the resource of the Dynamic Network forum for more than 10 times times the resources; In addition, some dead loop programs, or not optimized programs (such as the 1.0 version of the Arjunolic statistics in the case of too large database) will take up too much system resources, and system resources are obviously limited. Since our new virtual host is a WINDOWS2003 operating system, the Web sites are running independently of each other and will not affect each other.

If a site's programs account for too much or too many errors, the system log prompts: "Application pool ' west263pool11 ' is automatically disabled because of a series of errors in the process serving this application pool, or a hint: application pool ' hui999 ' has exceeded its job limit setting. For more information, see the Help and Support Center in http://go.microsoft.com/fwlink/events.asp.
At this point, visit this site will be prompted: Service unavailable. The general system will return to normal in about 30 seconds, more than a few times can be normal access to refresh.
If a similar error occurs frequently, please optimize the website program in time, or upgrade your virtual host to a higher type to get more system resources.

Programs consume too many resources for the following reasons:
1. One or more Access databases are corrupted during multiple reads and writes, and Microsoft's MDAC system is in block state when writing to this corrupted access file, so that other threads can only wait, and IIS is deadlocked. All CPU time is consumed in the Dllhost (ASP process).
Reference Workaround:
Compress and repair my database
Download database file--[If it is an. asp extension, change to. mdb extension]--use Access to open--select Tools--Database utilities--Compress and repair databases--[ Change back to. asp's extension]--upload overwrites the original database file
2. Registering bad COM components, especially active X controls developed with VB, can lead to increased memory usage
Reference solution: Minimize or avoid unwanted components that are not unofficial or required by the customer
3. multimedia file downloads Use server Bandwidth
Reference solution: Stop downloading
4. Program problems
You need to shut down databases that are no longer in use, to avoid using server resources to add the following sub in the Conn.asp Connection database string statement EndConnection () Conn.close set conn=nothing End Sub
Other program issues: Remove the hook for the friendly HTTP error message in the IE option, then visit the Web site to see what error message is displayed, and then debug
5. Upload important databases and other file updates, because it is being accessed, it may cause an instantaneous occupancy rate to rise
generally this situation is less, if this situation, it may be necessary to pause the site, and then update
6.ACCESS forum (such as dynamic network) after the large database problems will be very easy to appear, When your forum database in more than 30M, posts about 50,000, there may be a database unbearable situation
7. It is recommended to cancel the error-tolerant statement on resume Next, which is used in the program, to debug errors. Temporary solution: Periodically delete redundant data, compress database, limit forum irrigation, and even restrict forum registration. If it is a dynamic network forum, you can use the forum's own table storage function, will have a better effect
more long-term approach: to replace the forum and the database, generally using the dynamic network of SQL commercial version of the +mssql solution
 

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.