Apache Serverlimit hardcoded?

Latest response

I am using Apache on RHEL 7 since along time.
httpd-2.4.6-97.el7_9.x86_64

I use it with mod_mpm_prefork module, the default on Redhat.

I see, shortly after startup, messages in errorlog like
AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

I have tried to do that

StartServers 20
MinSpareServers 10
MaxSpareServers 20
ServerLimit 512
MaxRequestWorkers 512
MaxConnectionsPerChild 10000

I also tried much higher values of ServerLimit and MaxRequestWorkers, like 6400 or 30'000

It makes no difference, the error message appears.
In server-status, I always see four lines of 64 servers, i.e. a total of 256 servers shown, like this:

.R_RRRRR_RRRRRKCCC_C..R_RRRKRRCC.R_CCKRKRRRRRKC.KRKR_R.__RKCRRRK
.KKRWRC_R_RCRRCKR_KRKKRRKKKKRKRC.C_RRRKR_RRRRC.K................
................................................................
................................................................

How can I get beyond these 256 servers?

The machine has 64 cores, and 132 Gb RAM.

I know that I can switch to mod_mpm_event, but before I go that way, I would like to know why I cannot more than 256 servers in prefork mode.

Responses

The issue was quickly resovled by help from the Apache users mailing list. I had an error in httpd.conf by placing "IfModule mpm_prefork_module" settings before the line Include conf.modules.d/*.conf

Moving the "IfModule mpm_prefork_module" further down resolved the issue. I have now 4096 MaxRequestServers configured and observed that at most 1400 have been used, over three days.