Error 508 occurs when you exceed the resource limits in your plan. There are several reasons that can cause this.
In this guide, 508 error: how to solve it, we will see what are the possible causes of the error 508. Based on the origin of the problem, we’ll also see how to solve it, in order to get the site accessible again and avoid the error from recurring.
To start with, let’s see what is meant by resource limits and what systems are used to keep consumption under control.
Table of Contents
Error 508 and resource limits
Hosting resource limits are used to ensure that all sites hosted on the server are functioning properly, without overloads that compromise one or more sites.
The moment these limits are exceeded when trying to visit the site you will see an error page with a warning like this:
Error 508 Resource Limit Is Reached
How is resource management monitored?
Our servers are equipped with CloudLinux, a management system designed specifically for hosting environments.
CloudLinux uses a technology called LVE or Lightweight Virtual Environment. This system allows you to isolate individual accounts and limit resources. Thus, by imposing limits on the use of CPU, RAM, I/O and the number of processes, you can get a proper distribution of resources.
The goal is to prevent a single user from overloading the entire server, causing problems for all users sharing the same server. A situation that could occur in a shared hosting, but that can be avoided by adopting this system.
In the absence of such systems, and before they were adopted, the sudden spike in traffic of a single site was able to cause disruption to all sites hosted on the same machine. In such a situation, you would have had the site down because of an excessive request of resources from another site hosted on the same server.
What happens when you exceed your resource limit?
First, we need to understand what kind of resources we are talking about. CloudLinux monitors the usage of RAM, CPU, I/O and the number of processes.
Error 508 or, as we will see other errors 5xx, occur when an account exceeds the threshold of allowed resources. For example, exceeding the memory usage or the maximum number of processes allowed.
Let’s see what happens in the different cases.
If you reach the set memory limit, the system will first try to free memory, starting with the cache. If the memory is still insufficient, some processes will be terminated.
This will result in error 500 or error 503. These are temporary errors that are removed automatically as soon as you are within the limits.
When the CPU limit is reached, the system first slows down the running processes to keep them within the limits. If, on the other hand, the maximum number of processes is exceeded, you get error 508.
When the I/O limits are exceeded, i.e. reading and writing data on the disk, CloudLinux slows down the processes in progress so as to keep them within the limits, in these cases the site remains active.
How to check the resources used by your site
You can check your resource usage and see if you’ve exceeded your limits by checking your account metrics from your control panel.
Log in to cPanel and open the “Resource Usage” tool from the metrics section.
This will allow you to see if your site has been forced back into the limits recently. For real-time consumption just click on Current usage as you see in this screenshot.
Error 508: possible causes and how to solve it
We have seen that error 508 appears when you exceed your account limits, but what is behind it, how can you solve it?
Identifying the causes of error 508 is the only way to solve the problem. Let’s take a look at the possible causes and what methods we can use to fix them.
High traffic and DDoS attacks
Among the most common situations that can lead to an error 508, is a spike in traffic.
You might have a sudden increase in traffic to your site after starting an advertising campaign. In this case, since this is a situation that you can predict, you should take action beforehand, perhaps switching to a plan with more resources.
The traffic spike, however, can also be unexpected. In that case, you can assess whether it is an isolated event and wait for the traffic to return to normal.
In other circumstances, however, an unusual increase in traffic could be due to a DDoS attack that tries to overwhelm the server with continuous requests.
To prevent such attacks, CloudLinux monitors the number of simultaneous connections (entry process) that occur on the site. If the limit is exceeded, error 508 appears.
Spam in the comments section
Contact forms are often targeted by bots with the goal of automatically sending massive amounts of spam comments.
While the bot is in action, multiple connections are opened, exhausting the available resources. As a result, the limits are exceeded and error 508 is displayed to anyone trying to visit the site.
One of the methods to avoid spam in comments is to use the CAPTCHA code.
Executing processes
There are several processes that can be resource-intensive and cause the error 508. Some common situations are an ongoing site backup process, or while running a cron job.
Similarly, a particularly complex database request can also be responsible for error 508.
If your site has experienced a hacker attack, the massive resource usage could be coming from a malicious script that is running without your knowledge. In this case, the first thing to do is to analyze the access logs to the site.
The entry process limit can also be exceeded if your site is undergoing a brute force attack. This type of attack involves trying to access a site using combinations of username and password to try to find the correct ones.
At SupporHost we use proprietary rules to protect your site from this type of attack. In any case, remember that using long and complex passwords is crucial to keeping your site safe.
Third-party applications
In detail, you should also pay attention to third-party applications and scripts used. An example may be a WordPress plugin or theme that requires more resources than it should.
The best way to avoid such problems is to keep WordPress plugins and themes up to date and avoid using applications that are not updated frequently.
If you want to make sure that the error 508 is caused by a massive resource usage of a plugin you can do a test. First, deactivate all plugins (this applies to themes as well) and check if the error still occurs.
If the error does not appear anymore, you will have to figure out which plugin is causing the problem. To do that, reactivate the plugins one by one and check continuously if error the 508 reappears after you’ve reactivated each plugin.
In case you manage to identify the “culprit” there are three alternatives. First, check if there are any available updates, update the plugin and try to see if the error has been fixed.
If there are no updates available, try to contact the developer. Reporting the error will ensure that other users do not end up in the same situation as you.
In case you can’t solve it, you will have to find an alternative to the plugin (or an extension) you were using.
If you have a WordPress site you can find a plugin that has the same functions by searching in the official directory. For Joomla you can check the extensions directory and for PrestaShop the modules directory.
It’s clear that you certainly care about the performance of your site and you know how important it is to have a fast site, so remember to avoid plugins that slow down WordPress.
Upgrade the plan: when is it necessary?
As we have seen, the first thing you should do is to rule out the possibility that the cause is a resolvable problem.
Among the cases we’ve looked at is an attempted hacker attack, a site targeted by spam, or a plugin that takes too many resources.
You also have to consider possible problems with the code due to adding site features that use resources disproportionately. Exclude the possibility that it is a temporary problem, such as a backend operation: from running a backup to a database query.
If you’ve ruled out all possible causes, it means your site really needs more resources. The most likely scenario is that you’re registering more visitors. If this trend becomes the norm, it means that it’s time to switch to a plan with increased resources.
In case your plan is a shared hosting you can consider switching to a semi-dedicated hosting. Or if the resources of the latter are not enough, you can choose a dedicated solution: a VPS cloud hosting or a dedicated server.
With SupportHost, you can upgrade at any time, without any disruption and only pay the difference.
Conclusion
In this article, 508 error: how to solve it, We’ve seen the possible causes of the error 508, an alert of this type tells you that your site is using more resources than your plan provides. Among the causes we’ve examined there can be a programming error, a plugin that doesn’t work properly or an unauthorized access attempt.
In all these cases by taking action at the source of the problem, the error can be fixed. When the 508 error is caused by the consumption of resources that actually serve your site and it’s not just a temporary traffic spike, all you need to do to resolve it is to switch to a higher level.
Have you ever encountered error 508 on your site? Were you able to identify the cause and fix it? Let me know in the comments below.
Leave a Reply