[sg_popup id=”2″ event=”onload”][/sg_popup]
Are you really frustrated with this warning on your website? Here we go for a solution!
Resource Limit Is Reached, cPanel with CloudLinux. This warning appears mainly in domains hosted on a CloudLinux installed server. In a CloudLinux installed server, each account has a predefined amount of resources.
The error message “508 Resource Limit Is Reached” appears when the account (domain) is constantly exceeding the resources assigned to it. This is the main difference between traditional hosting vs CloudLinux hosting.
In CloudLinux it uses LVE (Lightweight Virtualized Environments) to separate each accounts with a predefined resources. It helps a balanced hosting environment.
LVE helps to stop other users from starving your website of precious system resources, Cloudlinux pro-actively monitors resource usage, and limits account when they exceed a predefined usage limit. This would cause this error “508 Resource Limit Is Reached.”
CloudLinux is a Linux based Operating system especially used in a shared environment which isolates each user in its own light weight virtualized environemnts (LVE) which consumes predefined amount of resources allocated for each user. That is, each user will be in a caged environment.
The resource usage of any user won’t affect the stability of another users. Each user will be allocated a specific amount of resources. If a user’s PHP script utilizes the entire resources allocated to it, then it won’t affect other users. Only that particular user will face problems related to this.
Important limiting factors:
SPEED : This directives allows you to set the CPU limit in terms of % of a single core, or as a fixed number of Hz. This is relative to one core, for example;
--speed=50% would mean 1/2 core. --speed=100% would mean 1 core, --speed=150% would mean 1.5 cores
VMEM (MB) : Virtual memory limit corresponds to the amount of memory processes can allocate within LVE.
PMEM (MB) : Physical memory limit corresponds to the amount of memory actually used by end customer’s processes.
EP : This is the main parameter beyond “508 Resource Limit Is Reached” problem.
NPROC : NPROC controls the total number of processes within LVE. Once the limit is reached, no new process can be created (until another one dies). When that happens fNPROC counter is incremented. Apache might return 500 or 503 errors in such case.
IO (kBps) : IOPS limits restrict the total number of read/write operations per second. When the limit is reached the read/write operations stop until current second expires.
Resource Limit Is Reached
As I stated, the parameter EP (Entry Process) controls this fact. EP is the concurrent connections to the Apache server. That means the Apache processes entering into the LVE. This is the important limiting factor. Each LVE limits the amount of EP to the Apache server to avoid a single website exhausting all resources.
If the limit is reached, the Apache module “mod_hostinglimits” won’t be able to place Apache process into that particular LVE. The server will return 508 error (Resource Limit Reached), without affecting other users on that server.
See this section : Resource allocation and monitoring using LVE – CloudLinux
You can check this from the cPanel itself : cPanel >> Logs >> Resource Usage.
How to fix this?
First, check whether the website is under any attack or not. Yep, a DoS to your website can cause this simply. Check the access log on server and find any DoS to your website. In a cPanel server the log is located under:
>> /usr/local/apache/domlogs/$USERNAME/ Or >> /home/$USERNAME/access-logs/
In WordPress sites this problem is common due to Wp-login.php attack. You can protect the site against this. Please see the hardening steps for a WordPress site :>> WP Harden
Next, you can try disabling plugins, disabling any special features, and/or repairing your database(s). Then, you can look into optimizing your script(s). Your webmaster or the script developers should be able to assist with this.
If any of the above steps didn’t work, you may need to upgrade the EP value.