This is an old revision of the document!

LSWS “PHP suEXEC Max Conn” should less than CloudLinux LVE EP limit

LVE is a kernel level technology developed by the CloudLinux team.

Each LVE limits amount of entry processes (web server processes entering into LVE) to prevent single site exhausting all web server processes. If the limit is reached, then mod_hostinglimits will not be able to place web server process into LVE, and will return error code 508. This way very heavy site would slow down and start returning 508 errors, without affecting other users.

If the site is limited by CPU or IO, then the site will start responding slower. If the site is limited by memory or number of processes limits, then the user will recieve 500 or 503 errors that server cannot execute the script.

What's the LSWS “PHP suEXEC Max Conn”? Any relationship between “PHP suEXEC Max Conn” and CloudLinux LVE?

"PHP suEXEC Max Conn" is a LiteSpeed web server setting, which specifies the maximum number of concurrent PHP processes that can be created by LSWS for each user when running PHP scripts in suEXEC mode. Default value is 5. This limit is per user per lshttpd process. Thus, if you have a 2-CPU license, this limit will be doubled. The limit will be 4x for a 4-CPU license, and so on.

Entry processes(EP) limit control the number of entries into LVE. 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 NPROC counter is incremented. Web server might return 500 or 503 errors in such case.

For shared hosting environment, “PHP suEXEC Max Conn” should not be set to too high. Generally 5 or 10, normally not over 50. If PHP suEXEC Max Conn reached, it won't bring down the server, but only placed extra php connection “PHP suEXEC Max Conn” should be always less than Cloud Linux user account EP limit. High “PHP suEXEC Max Conn” setting doen't necessary mean the performance gain. A lot of time it may over kill the server. Good practice is to start it from 5 or 10 and monitor the real time stats for your busiest domain during the peak traffic time. If the waitQ is constantly > 0, “PHP suEXEC Max Conn” can be gradually increased but it has to be always less than EP for all LVE accounts. “PHP suEXEC Max Conn” is a global setting which will impact all shared hosting accounts.

  • Admin
  • Last modified: 2016/01/28 22:13
  • by Jackson Zhang