Why does the website sometimes prompt "Service unavailable?

Source: Internet
Author: User
Q: Why is the "Service unavailable" prompt sometimes displayed on my website, which can be accessed after several refresh times.

A: This is because your website has exceeded the system resource limit, mainly because the traffic is too large or the program occupies too many resources.
1. The traffic is too large.
For example, if you purchased a B002 basic host, the rated traffic of the host is 15 GB/month. If your website traffic is 15 GB per month and less than GB per day, you should be able to access your website normally. If the traffic increases for several consecutive days and the traffic exceeds 0.5 GB/day, the host is overloaded. When overload occurs, sometimes access is normal, and sometimes the service is automatically stopped (unavailable) by the system. Solution: first, log on to the VM management center and check the recent access statistics and traffic statistics to see if the traffic increases abnormally, sometimes, when an individual RAR or mp3 file on the website is leeched by another website, the traffic may increase by dozens of times. By analyzing the log downloading feature and the "file category" feature in access statistics, we can determine whether there is a leeching or a large number of downloads. If the traffic increases naturally and the purchased model cannot meet the requirements, you need to upgrade the virtual host model to obtain more traffic quotas.
2. The program occupies too many resources
For example, for a forum of 100 online users, leiao Forum accounts for more than 10 times of the resources occupied by the Forum. In addition, some endless loop programs, or unoptimized programs (for example, if the database size of version 1.0 is too large, a large amount of system resources will be occupied, and the system resources are obviously limited. Because our new virtual host uses the Windows2003 operating system, each website runs in an independent process and does not affect each other.

If a website program occupies too many resources or has too many errors, the system log will prompt: "The application pool 'west263pool11' is automatically disabled, the reason is that a series of errors occur in the process that provides services for this application pool, or the prompt is: The application pool 'hui999' exceeds its job restriction settings. For more information, see Help and Support Center in http://go.microsoft.com/fwlink/events.asp.
When you access this website, the message "Service unavailable" is displayed. Generally, the system returns to normal in about 30 seconds, and can be accessed after several refreshes.
If similar errors often occur, optimize your website programs in time or upgrade your VM to a higher model to obtain more system resources.

 

The reason why the program occupies too many resources is as follows:
1. one or more access databases are damaged during multiple read/write operations. When Microsoft's MDAC system writes this corrupt access file, the ASP thread is in the block state, and other threads can only wait, when IIS is deadlocked, all CPU time is consumed in the DLLHOST (ASP process.
Reference solution:
Compressing and repairing my databases
Download database files -- [If yes. change the ASP extension. MDB extension] -- open with access -- select tool -- database utility -- compress and fix database -- [change back. ASP extension] -- upload to overwrite the original database file
2. Registered bad COM components, especially the Active X control developed with VB, may result in increasing memory usage.
Reference solution: minimize or avoid unnecessary components that are not official or required by the customer
3. server bandwidth occupied by multimedia and other file downloads
Reference solution: Stop download
4. Program Problems
You need to close databases that are no longer in use in time to avoid occupying server resources until the following sub endconnection () Conn. Close set conn = nothing end sub is added to the conn. ASP database connection string statement.
Other program problems: deselect the friendly HTTP Error information displayed in the IE option, visit the website to view the error information, and then DEBUG
5. Upload important database and other file updates. Because the files are being accessed, the usage may increase instantly.
Generally, this is rare. In this case, it may be necessary to pause the site before updating it.
6. when the access forum (such as the mobile network) is too large, it is easy to encounter database problems. When your forum database is over 30 mb, about 50 thousand posts may cause a situation where the database is too high.
7. We recommend that you cancel the on error resume next Fault Tolerance statement used in the program and debug the error. Temporary solution: regularly Delete excess data, compress databases, restrict Forum bumping, and even restrict forum registration. If you are using a dynamic network forum, you can use the table sharding function provided by the forum to achieve better results.
Long-term solution: the solution of changing forums and databases generally adopts the dynamic SQL commercial version + MSSQL.

 

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.