Hi there!
Recently I faced an issue with Apache httpd unable to server content due to reaching MaxClients setting. I found its caused by requests going to one of the sites hosted on this server. Initially I thought - its DDoS but later I found those are legitimate http request. The problem was the httpd stopped responding to any other request due to reaching MaxClients setting effectively taking down all sites on this server.
The server runs CloudLinux system with mod_hostinglimits and has kinda low MaxEntryProcs setting for this user - EP=200. It seems to be working good. I saw the users being limited within its LVE settings and getting 503 or 508 for most of these enormous requests. Here comes the issue - httpd still needs to serve those 503 or 508 pages and when its getting more and more requests it will eventually hit MaxClients setting.
Short term solution for this is just to rise MaxClients. Thats not a good solution though. What if we could set MaxClients per vhost?
The mod_itk provides such setting. Im not sure how it really works but if this can prevent a single tenant from taking down whole server I would say its good solution.
I wish to see mod_hostinglimits can have similar feature. Please consider adding such feature on CloudLinux roadmap.
How to recreate:
1. Setup CMS site (Wordpress, Joomla)
2. Set MaxClients for mpm you use to 2048
3. On some other, decent server run: siege -c4000 this.site.url/index.php
4. Watch server-status or error log
Recently I faced an issue with Apache httpd unable to server content due to reaching MaxClients setting. I found its caused by requests going to one of the sites hosted on this server. Initially I thought - its DDoS but later I found those are legitimate http request. The problem was the httpd stopped responding to any other request due to reaching MaxClients setting effectively taking down all sites on this server.
The server runs CloudLinux system with mod_hostinglimits and has kinda low MaxEntryProcs setting for this user - EP=200. It seems to be working good. I saw the users being limited within its LVE settings and getting 503 or 508 for most of these enormous requests. Here comes the issue - httpd still needs to serve those 503 or 508 pages and when its getting more and more requests it will eventually hit MaxClients setting.
Short term solution for this is just to rise MaxClients. Thats not a good solution though. What if we could set MaxClients per vhost?
The mod_itk provides such setting. Im not sure how it really works but if this can prevent a single tenant from taking down whole server I would say its good solution.
I wish to see mod_hostinglimits can have similar feature. Please consider adding such feature on CloudLinux roadmap.
How to recreate:
1. Setup CMS site (Wordpress, Joomla)
2. Set MaxClients for mpm you use to 2048
3. On some other, decent server run: siege -c4000 this.site.url/index.php
4. Watch server-status or error log
Comment