[Case 52321] Bug - Cant change ServerLimit whit MPM_Event ( Lower than Max Request Workers )

Skamasle

Member
Mar 18, 2012
22
0
51
cPanel Access Level
Root Administrator
HI first of all sorry for my bad english.

I use apache 2.4 and mpm_event.

I try set a ServerLimit value to 40 and Max Request Workers to 100, and get this error

The following settings are invalid and were rejected:

maxclients: 100
So is the same error when try set a highest value of serverlimit than Request Workers using prefork.

But that error using prefork is normal, I understand it.

The problem here is if I set default cpanel value to apache using mpm_event I get overload, so

Code:
Serverlimit 256
Max Request Workers 150
Using event thats mean than apache can start 256 servers and each server can handle 150 request so 256 * 150 = 34800 request

I dont know if I dont understand how working mpm_Event ( but I think I undestand it )

Is like nginx workers
Code:
[B]worker_processes 1[/B]; = ServerLimit
[B]worker_connections 600[/B]; = Max Request Workers
Is something like that.

Now I say this because I have some servers whit 7k online people on analytics but are 150 to 400 req/s and apache overload the server until than I change serverlimit value

So if I do something like this:
Code:
Serverlimit 256
Max Request Workers 150
I get a lot of apache process ( 256 ) And load average go up until 150

But if I manually change that from ssh to
Code:
ServerLimit 40
Max Request Workers 400
I get only 40 I get 40 apache process, and serverload of 5 and site response is in only on 1s.

So the point is than I cant set a ServerLimit value lower than Max Request Workers I untherstand it if I use prefork but whit event I have alot of problems.

The same problem I get before whit worker, whit worker serverlimit value is very low so works similar to event, here the default mpm_worker config from apache's site:

Code:
ServerLimit         16
StartServers         2
MaxRequestWorkers  150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
So if you try put it vía WHM using worker you get error like this:


The following settings are invalid and were rejected:

maxclients: 150
And the last problem here is than I set Max Request Workers and cpanel say cant change maxclients


I test this on 5 servers and get same error.

I hope you understandme, I try to report a bug ( if is bug ) but dont see any bugtracker or bug report category.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Yes, the workaround is to modify the "maxclients" value in the "/var/cpanel/conf/apache/local" file. Here is an example of the output of this value after modifying the file:

Code:
# grep maxclients /var/cpanel/conf/apache/local
  "maxclients":
      "maxclients": 400
Ensure the Apache configuration file is rebuilt after making the change:

Code:
/scripts/rebuildhttpdconf
Thank you.