Symptoms
Receiving the following error when browsing an account's site on a CloudLinux Server:
508 Resource Limit Is Reached
The website is temporarily unable to service your request as it exceeded resource limit. Please try again later.
Description
The "508 Resource Limit is Reached" error is an error that appears when an account exceeds the resources assigned to it, which can include CPU usage, RAM usage, and/or concurrent processes for that account. This usually occurs when an account hits the allocated resource limit set in CloudLinux LVE Manager.
Common cause for this include:
- Website traffic spikes - If your site experiences high peaks in inbound or outbound traffic it can exceed allocated resources. Many times we have seen clients advertise on TV or Radio whilst still being on a shared web hosting package and receive 508 errors. If you are undertaking any activity that will send spikes of traffic to your website you will need to be on a dedicated hosting platform otherwise you may be wasting the valuable exposure that your website should be getting through the advertising you are carrying out.
If you ever are going to get large amounts of web exposure, make sure to be on a platform that can handle this well before the actual spikes occur.
- Problems in the site's code. If there are pages on your site that have speed issues, an increase in inbound traffic or concurrent page requests can push the site over its resource limits. Sometimes it can be badly written CMS plugins, theme or custom code that causes 508 errors. Being able to see which processes your account has running often assists in being able to identify files that the site gets stuck on that use up excess CPU or Memory. This is also a major cause of a site being slow when no one else is using the site.
- Backend operations – demanding backend operations such as imports and exports can create significant load, which in addition to normal traffic can cause resource limits to be exceeded. Often it could be a backup job, a long query that has been initialised from the back-end of a website or a cron job that carries out high-memory tasks that could be causing your 508 error. Usually the events should coincide with the actions being carried out which makes this a little easier to detect. Especially if you have resource usage errors at the same time that the cron jobs are being carried out or an website administrator is performing tasks in the backend that are causing resources to be consumed.
- Web Crawlers making a high number of requests per second. Web crawlers or automated scripts that are browsing your website can often be the cause of resource limit depletion. In addition to this, search engines indexing your site at a rapid pace can also cause your resource limits to be exceeded. In addition to this, sometimes malicious entities may be consistently accessing pages on your site that they know will be generating a lot of resource usage in order to Denial of Service your site. Looking through the servers access logs at the time the 508 error is being generated should be able to give you an idea of the activity on the site which has caused the issue and potentially be able to find the IP Addresses that are causing the issue and block them.
Google’s webmaster tools can be used to change the rate in which they index your site if you believe it is Google cause the issue when it is indexing your site. This can be adjusted to a lower rate of requests per second to prevent this from happening.
- Overloaded due to visitor numbers - Your website is suddenly receiving a very high amount of traffic (hits) - whether malicious - e.g. DDOS (Denial of Service attack) or not - e.g. you or your business appeared on the front page of Time magazine! Your website will show the error until the traffic subsides or is mitigated, or the resources for your account are increased.
- Overloaded due to a poorly coded script or app - If your website has a poorly coded or outdated script or app installed (e.g. an old version of WordPress or an outdated Plugin), it can be a "timebomb" because at some point, other core software on the server are likely to be updated and that can trigger the outdated app or script to malfunction. In this situation, it is common to find that the script / app becomes highly "resource intensive" (e.g. is continuously running and stuck in a loop, trying to suck all the server resources with it!), which in turn can spike the resources associated to your account, leading to the error page. Your website will show the error until the app is terminated or your account's resources have been increased. This is partly why we strongly recommend keeping all apps up to date via our maintenance plan
Workaround
If you see a 508 error message in the browser window, it typically means your account is constantly exceeding the resources assigned to it - these can include CPU usage, RAM usage and/or the number of concurrent processes running under your cPanel account.
You can fix this error by increasing the resources assigned to the account (Upgrading Plan) or reducing the amount of resources the account is using (Script Optimization) in order to ensure it does not hit its resource limit in the future.
Things to try
- Login to you hosting account cPanel and check the resource usage stats for your website. Navigate to > Analysis & Log Files > Resource Usage Overview - where you can display performance charts.
- Look for any warning messages which should provide some basic information on what's going on (e.g. Memory Exhausted or CPU limits reached).
- Check that your website software is all up to date.
- You can also check the document root of your websites for any "error_log" files, if you find an error_log file, you should take a look at the recent entries .
- Optimizing your database (if any of your sites are MySQL driven) via PHPMyAdmin is also a good way to keep things running smoothly.
- Running error free, well coded websites will vastly reduce the resource usage on your account and lead to a much more stable hosting experience.
- You may need to Uninstall any old software programmes / apps / plugins on your website, that could be malfunctioning.