tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
I am trying to configure my site to be able to handle more traffic because it bogs down when I get about 150 concurrent users.
I have been looking at tweaking the configs but I am confused because I think my managed host provider has added some stuff to the config.
If you log in to WHM and select Apache global configuration you get the interface to set these settings:
Start Servers
Minimum Spare Servers
Maximum Spare Servers
Server Limit (max 20,000
Max Request workers
Max Connections per Child
Keep Alive
Keep Alive timeout
max Keep Alive Requests
Timeout

however, when I click on the Include editor and I look at the Pre Main Include, the Pre VirtualHost Include I get additional configuration information that does not match the main configuration if I select All Version from the dropdown, but I dont see anything if I select 2.4.54 from the dropdown.
I am not sure why this is done but if they are different which one will it use for its configuration?
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
599
273
138
IN
cPanel Access Level
Root Administrator
You'll have to adjust Server Limit & Max Request workers for your server to handle the connections. Gradually increase these values till the issue is resolved.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,109
580
493
Finland
cPanel Access Level
Root Administrator
I am not sure why this is done but if they are different which one will it use for its configuration?
It will use the settings you have in Pre VirtualHost Include.
 

cPanelWilliam

Administrator
Staff member
Mar 13, 2018
221
41
153
Houston
cPanel Access Level
Root Administrator
Hello!

I am trying to configure my site to be able to handle more traffic because it bogs down when I get about 150 concurrent users.
It sounds like you could be encountering the MaxRequestWorkers limit, as the default value for this is 150. As @kodeslogic stated, you would likely need to increase both the MaxRequestWorkers and ServerLimit since MaxRequestWorkers cannot exceed the ServerLimit. We have more information about Apache tuning in the following support article:

Tuning MaxRequestWorkers for Apache
 

tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
yes, I have updated my apache config to
IfModule mpm_event_module>
StartServers 10
ServerLimit 65
ThreadsPerChild 300
MaxRequestWorkers 15000
MinSpareThreads 150
MaxSpareThreads 250
MaxConnectionsPerChild 15000
</IfModule>
hopefully this will make it run better when it gets busy

However, I still have not found a way to verify which config it is using. I have checkec httpd -V and it says -D SERVER_CONFIG_FILE="conf/httpd.conf" but the Pre main and the pre Virtual are both added via include in that httpd.conf file.
 

kodeslogic

Well-Known Member
PartnerNOC
Apr 26, 2020
599
273
138
IN
cPanel Access Level
Root Administrator
ServerLimit should be greater than or equal to MaxRequestWorkers value.
 

tagteam

Member
May 21, 2013
18
1
53
cPanel Access Level
Root Administrator
I am using mod event, not prefork, so ServerLimit * ThreadLimit should determine the maximum value for MaxRequestWorkers if I am not mistaken.