When being inside a CloudLinux OS Lightweight Virtual Environment (LVE) environment, it would be useful to be able to detect if having reached the system resource quota. Is that possible? Our desire is to adapt to infrequent overload by serving static error messages rather than failing to present dynamically created data.

Any links to API documentation would be most welcome, but I doubt there are any publicly available. The limits documentation suggests there should be a number of command line utilities, as well as a /proc/lve/list file. It seems however that (in the environment we have access to), there are no cli tools installed and the only file available in /proc/lve is (the seemingly also undocumented) task_sched_stat.

$ uname -r

There are a couple of files in /opt/liblve and /usr/include/lve. Can they be used as user? or are they merely intended for administration of LVE? From the function names one can guess that lve_check_fault() would be intended precisely to detect overuse from within a limited environment. However calling the lve_is_available() returns 0 suggesting no features of the library are available. Monitoring the system calls shows that the crucial failures are attempts to open the non-existent /dev/lve.

Our hosting provider's first suggestion is to use cPanel's REST API. Something which seems too heavy and too slow to be useful for mitigating an overload situation as it happens.

With our circumstances it is not relevant to scale to allow using more resources during these infrequent peaks. Gracefully handling the situation rather than dropping requests is the appropriate change.

  • Surely there are overload scenarios other than hosting-environment-specific types of resource exhaustion. Would it not make sense to let a proxy decide this based on exceeding response time limits, without regard for directly measurable resource consumption?
    – anx
    Aug 3, 2022 at 6:42
  • 1
    I the general case, sure! For us specifically, not necessarily. The devil is in the details. We are really hoping for an answer to the question phrased.
    – sampi
    Aug 3, 2022 at 7:03
  • There is now a post on forum.cloudlinux.com linking to this question.
    – sampi
    Aug 4, 2022 at 6:30


You must log in to answer this question.

Browse other questions tagged .