Why control the use of my website resources?

In shared and semi dedicated web hosting packages in our infrastructure the use of resources is controlled through the LVE Manager of Cloudlinux so that each user can use the resources that correspond exclusively to his package and no more.

In each package Plesk is defined a system user, which is given specific resource values ​​(CPU, RAM, Disk I / O, Processes). When these prices are exhausted by your site, there are delays but also the error message such as 502, 503 and 508 depending on the resource that is exhausted.

What are LVE and Cloudlinux?

Cloudlinux is a Linux-based operating system that allows us to better manage system resources, as through LVE it limits the resources that each user can use in its package and thus allows us to provide reliable services and not a user can affect the system in a shared hosting environment. In addition, it isolates each user in its environment and thus increases server security.

LVE manager (Lightweight Virtual Environment) is a core technology developed by Cloudlinux and has its roots in container-based virtualization. It is the part of Cloudlinux that monitors and limits the resources of each user based on the limits of its package and does not allow abuse by a user, while preventing the overload of server resources.What resources are restricted, what does each one mean and how does a potential restriction affect my websites?
The resources that are limited per package in our infrastructure are the following and the limits differ depending on the package.

CPU (Processing Power / SPEED)

CPU limits determine the maximum speed that can be utilized by a hosting package. Essentially the cores from the CPU that can use a hosting package before being restricted. When a user reaches the CPU limit, processes within that limit slow down and there are delays on the package web pages.

Physical Memory Usage (RAM / PMEM)

The maximum physical memory / RAM that the package can make use of. In case the usage of the package processes reaches the specific limit, the websites may present errors “503 Service Unavailable” or “Internal Server Error”.

Input / Output Usage (I / O)

I / O limits limit data traffic to the packet for the packet and are measured in MB / s. some cases “502 Bad Gateway Error” errors.

IO operations (IOPS)

The set of tasks that a package can run simultaneously on disk. If the usage of the package processes reaches this limit, the websites may be delayed.

Entry Processes (EP)

The entry processes represent the maximum number of concurrent connections of dynamic scripts in Apache and Nginx (for example PHP & CGI scripts), as well as SSH and cron operations running simultaneously. the web pages may have errors “503 Service Unavailable” or “508 Resource Limit Is Reached”.

Processes (NPROC)

The limit is similar to the above, but includes all the processes created by the package and not just the specific PHP, SSH or cron tasks. If the total usage of the package reaches this limit, the websites may experience delays and errors. “502 Bad Gateway Error” or “503 Service Unavailable”.

Possible causes and actions

Aggressive crawlers

First you need to rule out the possibility that these requests are made by an aggressive crawler.By locating the IPs from which they are made and even if the same IPs or the same subnets create a large volume of requests you can see from here whether it is a crawler or not.

If a crawler does generate a lot of requests you can either modify your .htaccess file to block IPs or the robots.txt file to restrict them.

Extensive use of resources from crons

In case the IP from which the requests are made is that of the server and the requests are those of the crons that you have created, you could consider if they can run at longer intervals or for some reason the request is not executed or is delayed. due to a programming error.

Problematic requests in the execution of the website

In case the number of requests you have identified does not justify the use of the resources you see at the time errors are generated, maybe a request is problematic and abuses resources while at the same time it is slow to execute. In this case you could enable the debugging of your application, so that you can see more details about these requests and proceed to relevant actions.

If you are using a CMS such as WordPress or Joomla, first make sure that the add-ons and theme / templates are compatible with each other and with the version of the CMS itself, so as not to create incompatibilities that lead to problematic requests. From our side we suggest everything to always be upgraded to their latest version and to remove add-ons that are no longer upgraded by their developers.

In addition, make sure that the PHP version you are using for the domain is compatible with your scripts and does not generate errors or delays. If from the above steps you do not isolate a problem that can cause misuse of resources, it means that the requirements of the websites exceed the resources of the package and you should consider the possibility of an upgrade.

See more services about web hosting:

Leave a Comment

Your email address will not be published.