FAQ: High resource usage (client program error)

更新时间:
复制 MD 格式

When a website's application consumes excessive CPU and memory, it wastes server resources. For example, if your website is built on a basic shared web hosting plan, issues like poorly written code or critical errors in your application can cause a sharp increase in server load. This can disrupt normal access to your website and is known as high website resource usage (client program error). This article answers frequently asked questions about this issue on Web Hosting.

Causes of high resource usage

Common causes of high website resource usage (client program error) include:

  • Inefficient application code, such as failing to clear variables in a script.

  • Frequent database calls. For example, the performance of an Access database may degrade when it grows larger than 100 MB.

  • Excessive website visits or heavy traffic that exhausts memory resources.

High resource usage vs. heavy traffic

Heavy traffic primarily consumes network bandwidth, while high website resource usage (client program error) can disrupt normal server operation. The key differences are:

  • High website resource usage (client program error): This typically involves excessive CPU or memory consumption. Inefficient website applications can cause server load to spike, preventing the server from functioning properly.

  • Heavy traffic: This refers to activities that consume significant bandwidth, such as large-scale image downloads, ad exchanges, or chat services.

Suspension notice for high resource usage

When your website's resource consumption severely affects server performance, Alibaba Cloud may suspend your website and send you a suspension notice for high website resource usage (client program error).

The suspension notice reads as follows:

Dear Customer,
Your website has been suspended because it severely impacted server performance. To ensure stable service for all users, we monitor our servers in real-time and must take immediate action when issues arise. While we value your business, we must also enforce our hosting agreement. We understand this may cause inconvenience and apologize for the disruption. Thank you for your understanding and cooperation.

Suspension of Web Hosting instances

  • A basic shared web hosting instance can be suspended due to high website resource usage (client program error).

  • An advanced shared web hosting instance is not suspended for this reason. The reasons are as follows:

    • The underlying architecture is optimized to prevent site suspensions.

    • It uses a CNAME record by default, which effectively isolates network attacks and improves security.

  • An exclusive web hosting instance is not suspended for this reason.

To learn how to troubleshoot high resource usage on your Web Hosting instance, see How to identify links and files that cause excessive resource consumption.

Resolving high resource usage

Current Situation: To ensure your website's security and stability, Alibaba Cloud continuously monitors its operational status. If your site's performance degrades due to high resource usage, we take the following measures based on your hosting plan and the severity of the issue:

Solutions

  • For basic shared web hosting instances: Because these instances share resources with other sites, they are more susceptible to resource contention. We recommend you upgrade your basic shared web hosting instance to an exclusive web hosting plan or purchase a new advanced shared web hosting instance. For instructions, see Upgrade a Web Hosting instance or Migrate a website between instances under different accounts.

  • If the impact is minor: Your website may experience slow response times. We recommend restarting the application pool or the site.

  • If the impact is severe: The Web Hosting instance may become unresponsive, making all websites on it inaccessible. In this case, we recommend shutting down the entire site.

    Important

    You can restart a suspended site due to high resource usage up to three times per month. If you exceed this limit, you cannot restart the site until the following month.

Identifying problematic links and files

If your website has been suspended due to high resource usage, follow these steps to identify the links and files causing the problem:

  1. Log on to the Web Hosting management console.

  2. Find the Web Hosting instance with high resource usage and click Manage in the Actions column.

  3. In the left-side navigation pane, choose File Manager > Website Log Download.

  4. On the Website Log Download page, find the access log file for the current day and click Download in the corresponding Actions column.

  5. Use an FTP client to download the log file to your local machine.

    The log file is stored in the /www folder of your Web Hosting instance.

    Note

    For more information on using an FTP client to download log files, see Manage website files by using FileZilla.

  6. Open the log file with a text editor on your local machine.

    There are no access logs after a site is suspended. Therefore, examine the logs from one to two minutes before the suspension. The following is an example of a complete access log entry:

    2021-07-22 05:44:43 xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx GET / - - 0 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/xxx+Safari/537.36 - xxx.xxx.com 404 7145 1866

    The following table describes the key parameters in an access log.

    Parameter

    Description

    The time of the access request.

    The client's IP address.

    The request information received by the server, including the request method, requested resource, and protocol.

    The client's browser type.

    The domain name of the website.

    The HTTP status code.

    The number of bytes sent by the server.

    The time the server took to respond to the request, in microseconds.

  7. Analyze the log to identify key information.

    1. Check the client IP addresses.

      If a large number of requests originate from the same client IP or IP range, your website might be under attack. For more information, see Common network attack types and troubleshooting suggestions.

    2. Check the client browser types.

      If the client browser types include keywords such as Baidu, Google, Sogou, or 360, it indicates that search engine crawlers are accessing your site. For more information, see Solutions to heavy traffic consumption by web crawlers on Web Hosting.

    3. Check the server response time.

      Server response time should generally not exceed 3 seconds (3,000,000 microseconds). Longer response times can lead to high concurrent access. Check and optimize the requested files or your website's application to reduce server response time.