Error 508 is caused by exceeding the maximum allowed number of concurrent Apache processes within the hosting account (Entry Process Limit). A description of the error is available in the official CloudLinux documentation. link.
For each request to dynamic content, a separate new process is created that processes this request, and the process counter in the hosting account is increased by one. When the process has completed all the necessary actions, it ends, and the process counter is decremented by one. The maximum number of processes in a hosting account is limited. When processes are created faster than they are terminated, the process queue clogs up and the maximum number of processes is reached. If the limit is reached (all available process slots are occupied), the server cannot create new processes and will return a 508 error for all processes over the limit. The error will be returned until the process queue is unloaded and there are free slots for new processes.
If a 508 error occurs, you should analyze logs server to determine the types of requests that triggered these processes. The error is often accompanied by Errorlog site with records like "LVE enter: LVE(XXX) HANDLER(XXX) HOSTNAME(XXX) URL(XXX) TID(XXX) errno (7) Read more: http://e.cloudlinux.com/MHL-E2BIG min_uid (0)».
Common causes of the problem:
A large number of requests to one or more site hosting account. For example, due to a DDoS attack or HTTP flood (frequent sending requests to the same page).
Insufficient optimization of site scripts, due to which they do not have time to process all incoming requests in a timely manner, with some increase in their number.
Suboptimal work of the site with the database. For example, the presence slow queries
or lack of indices.
Incorrect logic of the site, because of which it does not access its own resources directly, but via HTTP, thereby generating unnecessary requests.
If site scripts in the course of their work refer to third-party resources, the reason may be the unavailability or long response of these resources. Instead of quickly completing its work, the script has to wait for a response from the remote server, which is why the process takes longer than usual and, with a large number of requests, the process queue can quickly fill up.
Depending on the situation, the following solutions may be applied:
Determining the source of a large number of requests to the site (by analyzing Accesslogs
) and stop it. If it is impossible to stop the source, restricting access to the site for it.
If a DDoS attack is observed on the site, the connection services
traffic filtering (DDoS protection).
Optimization of the consumption of resources used by the site to generate pages. For example, transfer
for a newer version of PHP, connecting additional services Memcache, OPcache
, optimization of the database structure and queries to it, organization of caching by means of the site itself (installation of caching plugins).
active processes. This method may not solve the problem, since the source of the appearance of many long-running processes has not been eliminated.
If you cannot independently determine the cause and take action, you should report the problem to the developer.
You can also consider the option of switching to one of the tariffs businesshosting with a large Entry Process Limit.