fb-pixel

Exceeding Hosting Resource Limits: How to Fix

Have you encountered the error message “508 CloudLinux Resource Limit Is Reached” or “507 Insufficient Storage” while visiting your website?

This guide explains the meaning of these errors, their causes, and how to solve and prevent them.

What Do Error 508 and Error 507 Mean?

The error messages “508 CloudLinux Resource Limit Is Reached” and “507 Insufficient Storage” indicate that your site has surpassed the resource limits allocated to your hosting plan. You can view an example of the error page here.

Error 508 Cloudlinux Resource Limit Is Reached

Each shared hosting plan has specific resource limits to maintain the overall stability of the server.

These limits ensure that no single website can monopolize all server resources, thereby preventing issues for other accounts.

What Resources Are Limited?

CloudLinux, a server operating system, manages the usage of various resources:

  • I/O (Input/Output): The amount of data that can be transferred between the server and storage.
  • RAM (Random Access Memory): The temporary memory used to store data and applications.
  • CPU (Central Processing Unit): The percentage of the processor used to perform the instructions and calculations required to run the website.
  • EP (Entry Processes): The maximum number of active simultaneous connections a website can handle.
  • NPROC (Number of Processes): The maximum number of concurrent processes in the individual hosting account.

What Causes These Errors?

Several factors can lead to the 508 error for resource limits being reached. Here are the most common causes:

Traffic Spike: A sudden and temporary increase in visitors can cause the resource limits to be exceeded.

Issues with Scripts or Plugins: Certain plugins or scripts may activate many simultaneous processes, causing resource limits to be exceeded.

DDoS Attacks: Denial-of-Service (DDoS) attacks overwhelm the server with massive numbers of requests, leading to exceeded resource limits.

Aggressive Scanning by Bots: Excessive access by bots scanning the site can also trigger the 508 error.

How to Fix the Error

To resolve error 508, we first need to identify its cause. Once we understand the cause, we can apply the appropriate solution.

Identify the Causes

There are several checks we can perform to understand the root of the 508 error.

Check Resource Usage

Log into cPanel and use the Resource Usage tool to check resource utilization.

Cpanel Resource Usage

Here, you can see the usage of CPU, RAM, I/O, and EP. This helps you determine which resource has exceeded its limit.

Additionally, you can access Snapshots via Resource Usage > Snapshots. These snapshots capture information at the moment the problem occurs, allowing you to identify which scripts were running and whether the cause is a script or a database query.

Cpanel Resource Usage Snapshots Example

Analyzing the graphs also helps pinpoint the peak times of resource usage, allowing you to identify the relevant time intervals in the logs.

Analyze Site Access Logs

From cPanel > Raw Access, you can access the site access logs.

Cpanel Raw Access

These logs contain all site accesses and the outcome of each request. You can download the logs and open them with a text editor, such as Notepad.

Check the Error Logs

To determine if the error is due to a code problem, check the “error_log” file, where you will find logged errors.

Check the Statistics

As mentioned, one cause of error 508 is traffic.

Use cPanel’s Awstats and Webalizer tools to check traffic statistics and see if there has been a sudden and significant increase in visits.

Cpanel Awstats Webalizer

Possible Solutions

Now that we’ve identified the causes of error 508, let’s explore solutions based on the situation.

Optimize the Website

If the error is due to a script or plugin, disabling them can reduce resource consumption. Optimizing the code or replacing a plugin with a more efficient one can be the best solution.

Kill All Running Processes

In a shared environment, you cannot directly kill processes, as this requires system administrator privileges.

However, you can force processes to shut down by changing PHP versions.

Cpanel Select Php Version Settings

Use the Select PHP Version tool to set a different PHP version, then revert to the original version. This will force all processes to shut down and resolve the error.

Increase Resource Limits

If necessary, upgrade to a higher plan with more resources.

Only upgrade if it is truly necessary, such as in the case of a steady increase in traffic. If the problem is due to other causes, upgrading plans may not be the ultimate solution.

Block Malicious Bots

If your website is under attack by a malicious bot, you can block the user agent of the bot via an .htaccess rule:

SetEnvIfNoCase User-Agent "user_agent1|user_agent2|user_agent3" bot_malevoli Deny from env=bot_malevoli

Enable CloudFlare

In the case of a DDoS attack, activating CloudFlare and setting up WAF rules can help restrict access to the site and mitigate the attack. It may be appropriate to block all connections to the server except those that go through CloudFlare.

How to Prevent the Error

Here are some strategies to help prevent the 508 error:

Make Regular Backups: Regular backups allow you to recover data and avoid losing changes. This is especially useful if the error is due to a change or update.

Monitor the Site Regularly: Use the cPanel tools we have covered in the previous steps to monitor the site and quickly identify any issues.

Update Software and Plugins: Keeping your CMS and extensions up to date helps avoid errors in plugins and vulnerabilities that attackers can exploit for DDoS attacks.


Try one of our hosting plans for free and without obligation for 14 days. No payment information required!