You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alois Treindl <al...@astro.ch> on 2021/06/01 09:02:30 UTC

[users@httpd] Is ServerLimit 256 in prefork mode somehow hardcoded?

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  
<IfModule mpm_prefork_module>  
StartServers 20  
MinSpareServers 10  
MaxSpareServers 20  
ServerLimit 512  
MaxRequestWorkers 512  
MaxConnectionsPerChild 10000  
</IfModule>

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.

  

\--------------------------------------------------------------------- To
unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional
commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Is ServerLimit 256 in prefork mode somehow hardcoded?

Posted by Marc Serra <ms...@manxa.com>.
https://httpd.apache.org/docs/2.4/en/mod/mpm_common.html#serverlimit

There is a hard limit of ServerLimit 20000 compiled into the server (for
the prefork MPM 200000). This is intended to avoid nasty effects caused by
typos. To increase it even further past this limit, you will need to modify
the value of MAX_SERVER_LIMIT in the mpm source file and rebuild the server.

Missatge de Alois Treindl <al...@astro.ch> del dia dt., 1 de juny 2021 a
les 11:02:

> 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
> <IfModule mpm_prefork_module>
>     StartServers          20
>     MinSpareServers       10
>     MaxSpareServers       20
>     ServerLimit           512
>     MaxRequestWorkers     512
>     MaxConnectionsPerChild  10000
> </IfModule>
>
> 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.
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional
> commands, e-mail: users-help@httpd.apache.org



-- 
Marc Serra
Organització i Sistemes

-- 

Manxa 
1876, S.L. *
Ctra. 
Les Tries, 85. 17800 Olot (Girona)**Tel. 972 27 
45 30 Fax 972 27 45 32*


* Manxa Industrial | *Coneix
més aquí 
<http://www.manxaindustrial.com>



* Manxa Ferros | *Coneix
més aquí 
<http://www.manxaferros.com/>



* Manxa Ferreteria i Parament de la Llar | 
*Coneix
més aquí <https://www.manxabricolatge.com>


**

-- 


El contingut d’aquest correu electrònic i els seus annexos és 
estrictament confidencial. En el cas que no siguis el destinatari i hagis 
rebut aquest missatge per error, preguem que ho comuniquis al remitent i 
procedeixis a la seva eliminació, sense difondre, emmagatzemar o copiar el 
seu contingut. Imprimeix aquest correu només si és necessari.

El contenido 
de este correo electrónico y sus anexos es estrictamente confidencial. En 
el caso de que no seas el destinatario y hayas recibido este mensaje por 
error, rogamos lo comuniques al remitente y procedas a su eliminación, sin 
difundir, almacenar o copiar su contenido. Imprimir este correo solo si es 
necesario.

The content of this email and its attachments is strictly 
confidential. If you are not the recipient and you have received this 
message by mistake, please notify the sender and proceed to its 
elimination, without spreading, storing or copying its content. Print this 
email only if necessary.

Le contenu de cet e-mail et de ses pièces jointes 
est strictement confidentiel. Dans le cas où vous n'êtes pas le 
destinataire et avez reçu ce message par erreur, veuillez en informer 
l'expéditeur et procéder à sa suppression, sans diffuser, stocker ou copier 
son contenu. Imprimez cet e-mail uniquement si nécessaire.

Re: [users@httpd] Is ServerLimit 256 in prefork mode somehow hardcoded?

Posted by Eric Covener <co...@gmail.com>.
On Tue, Jun 1, 2021 at 5:02 AM Alois Treindl <al...@astro.ch> wrote:
>
> 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
> <IfModule mpm_prefork_module>
>     StartServers          20
>     MinSpareServers       10
>     MaxSpareServers       20
>     ServerLimit           512
>     MaxRequestWorkers     512
>     MaxConnectionsPerChild  10000
> </IfModule>

Is your MPM a loadable module and loaded after this stanza?  ifModule
doesn't work in such a case.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org