Re: [users@httpd] Question about apache2.4, prefork and mod_perl
On 09/13/17 14:05, Yann Ylavic wrote: Hi Norbert, can we keep the users@ mailing list CC-ed on this since it may be relevant for others too? Moreover people with a better knowledge of mod_perl than me could chime in... On Wed, Sep 13, 2017 at 1:33 PM, Norbert wrote: thanks - but it does not help - The case seems to be mod_perl specific (I know very few about it), "normally" preforked processes have the lifetime given by these directives... Could it be a crash of children processes somehow, or a special handling of processes in mod_perl? The creation of multiple root processes at startup looks special to me, usually httpd has a single root process to maintain children (www:www) processes, is a root process still alive after the load? For others on the list, your results below: have a look, I use top in 1 second intervals and extracted the httpd processes which have the user www. The minus represent the 1 second gap: - - 30830 www1 240 326M 31884K select 0 0:00 0.00% httpd 30832 www1 270 326M 31636K select 4 0:00 0.00% httpd 30833 www1 270 326M 31636K select 5 0:00 0.00% httpd 30834 www1 270 326M 31636K select 1 0:00 0.00% httpd 30831 www1 270 326M 31644K select 6 0:00 0.00% httpd 30835 www1 270 326M 31632K select 0 0:00 0.00% httpd - 30830 www1 240 326M 31884K select 0 0:00 0.49% httpd 30832 www1 270 326M 31636K select 4 0:00 0.49% httpd 30833 www1 270 326M 31636K select 5 0:00 0.49% httpd 30834 www1 270 326M 31636K select 1 0:00 0.49% httpd 30831 www1 270 326M 31644K select 6 0:00 0.49% httpd 30835 www1 270 326M 31632K select 0 0:00 0.49% httpd - 30830 www1 210 326M 31928K select 3 0:00 0.39% httpd 30832 www1 270 326M 31636K select 4 0:00 0.39% httpd 30833 www1 270 326M 31636K select 5 0:00 0.39% httpd 30834 www1 270 326M 31636K select 1 0:00 0.39% httpd 30831 www1 270 326M 31644K select 6 0:00 0.39% httpd 30835 www1 270 326M 31632K select 0 0:00 0.39% httpd - 30830 www1 210 330M 35880K select 3 0:00 0.59% httpd 30832 www1 270 326M 31636K select 4 0:00 0.29% httpd 30833 www1 270 326M 31636K select 5 0:00 0.29% httpd 30834 www1 270 326M 31636K select 1 0:00 0.29% httpd 30831 www1 270 326M 31644K select 6 0:00 0.29% httpd 30835 www1 270 326M 31632K select 0 0:00 0.29% httpd - 30830 www1 210 330M 35880K select 3 0:00 0.49% httpd 30832 www1 270 326M 31636K select 4 0:00 0.20% httpd 30833 www1 270 326M 31636K select 5 0:00 0.20% httpd 30834 www1 270 326M 31636K select 1 0:00 0.20% httpd 30831 www1 270 326M 31644K select 6 0:00 0.20% httpd 30835 www1 270 326M 31632K select 0 0:00 0.20% httpd - 30830 www1 210 330M 35900K select 4 0:00 0.39% httpd 30831 www1 200 326M 31652K select 4 0:00 0.20% httpd 30835 www1 200 326M 31636K select 6 0:00 0.10% httpd - 30830 www1 200 330M 35900K select 1 0:00 0.29% httpd 30831 www1 200 326M 31876K select 0 0:00 0.20% httpd 30835 www1 200 326M 31636K select 5 0:00 0.10% httpd - 30831 www1 200 326M 31932K select 7 0:00 0.29% httpd 30830 www1 200 330M 35900K select 0 0:00 0.20% httpd 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd - 30831 www1 200 326M 31932K select 7 0:00 0.20% httpd 30830 www1 200 330M 35900K select 0 0:00 0.10% httpd 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd - 30831 www1 200 326M 31932K select 7 0:00 0.10% httpd 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd - 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd 30831 www1 200 326M 31932K select 7 0:00 0.00% httpd 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd - 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd 30831 www1 200 326M 31932K select 7 0:00 0.00% httpd 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd - - - and then no www user is activae any more... Note: the test machine is only used by myself. Regards, Norbert On 09/13/17 13:08, Yann Ylavic wrote: On Wed, Sep 13, 2017 at 10:10 AM, Norbert wr
Re: [users@httpd] Question about apache2.4, prefork and mod_perl
Hi Norbert, can we keep the users@ mailing list CC-ed on this since it may be relevant for others too? Moreover people with a better knowledge of mod_perl than me could chime in... On Wed, Sep 13, 2017 at 1:33 PM, Norbert wrote: > > thanks - but it does not help - The case seems to be mod_perl specific (I know very few about it), "normally" preforked processes have the lifetime given by these directives... Could it be a crash of children processes somehow, or a special handling of processes in mod_perl? The creation of multiple root processes at startup looks special to me, usually httpd has a single root process to maintain children (www:www) processes, is a root process still alive after the load? For others on the list, your results below: > have a look, I use top in 1 second intervals > and extracted the httpd processes which have the user www. > The minus represent the 1 second gap: > > - > - > 30830 www1 240 326M 31884K select 0 0:00 0.00% httpd > 30832 www1 270 326M 31636K select 4 0:00 0.00% httpd > 30833 www1 270 326M 31636K select 5 0:00 0.00% httpd > 30834 www1 270 326M 31636K select 1 0:00 0.00% httpd > 30831 www1 270 326M 31644K select 6 0:00 0.00% httpd > 30835 www1 270 326M 31632K select 0 0:00 0.00% httpd > - > 30830 www1 240 326M 31884K select 0 0:00 0.49% httpd > 30832 www1 270 326M 31636K select 4 0:00 0.49% httpd > 30833 www1 270 326M 31636K select 5 0:00 0.49% httpd > 30834 www1 270 326M 31636K select 1 0:00 0.49% httpd > 30831 www1 270 326M 31644K select 6 0:00 0.49% httpd > 30835 www1 270 326M 31632K select 0 0:00 0.49% httpd > - > 30830 www1 210 326M 31928K select 3 0:00 0.39% httpd > 30832 www1 270 326M 31636K select 4 0:00 0.39% httpd > 30833 www1 270 326M 31636K select 5 0:00 0.39% httpd > 30834 www1 270 326M 31636K select 1 0:00 0.39% httpd > 30831 www1 270 326M 31644K select 6 0:00 0.39% httpd > 30835 www1 270 326M 31632K select 0 0:00 0.39% httpd > - > 30830 www1 210 330M 35880K select 3 0:00 0.59% httpd > 30832 www1 270 326M 31636K select 4 0:00 0.29% httpd > 30833 www1 270 326M 31636K select 5 0:00 0.29% httpd > 30834 www1 270 326M 31636K select 1 0:00 0.29% httpd > 30831 www1 270 326M 31644K select 6 0:00 0.29% httpd > 30835 www1 270 326M 31632K select 0 0:00 0.29% httpd > - > 30830 www1 210 330M 35880K select 3 0:00 0.49% httpd > 30832 www1 270 326M 31636K select 4 0:00 0.20% httpd > 30833 www1 270 326M 31636K select 5 0:00 0.20% httpd > 30834 www1 270 326M 31636K select 1 0:00 0.20% httpd > 30831 www1 270 326M 31644K select 6 0:00 0.20% httpd > 30835 www1 270 326M 31632K select 0 0:00 0.20% httpd > - > 30830 www1 210 330M 35900K select 4 0:00 0.39% httpd > 30831 www1 200 326M 31652K select 4 0:00 0.20% httpd > 30835 www1 200 326M 31636K select 6 0:00 0.10% httpd > - > 30830 www1 200 330M 35900K select 1 0:00 0.29% httpd > 30831 www1 200 326M 31876K select 0 0:00 0.20% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.10% httpd > - > 30831 www1 200 326M 31932K select 7 0:00 0.29% httpd > 30830 www1 200 330M 35900K select 0 0:00 0.20% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd > - > 30831 www1 200 326M 31932K select 7 0:00 0.20% httpd > 30830 www1 200 330M 35900K select 0 0:00 0.10% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd > - > 30831 www1 200 326M 31932K select 7 0:00 0.10% httpd > 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd > - > 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd > 30831 www1 200 326M 31932K select 7 0:00 0.00% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd > - > 30830 www1 200 330M 35900K select 0 0:00 0.00% httpd > 30831 www1 200 326M 31932K select 7 0:00 0.00% httpd > 30835 www1 200 326M 31636K select 5 0:00 0.00% httpd > - > - > - > > and then no www user is activae any more... Note: the test machine is only > used by myself.
Re: [users@httpd] Question about apache2.4, prefork and mod_perl
On Wed, Sep 13, 2017 at 10:10 AM, Norbert wrote: > Thanks, I set (on my testmachine): > > > MinSpareServers 4 > MaxSpareServers 4 > MaxConnectionsPerChild 10 > > > but nothing changes - the httpd processes with user www:www appear and > disappear in top after seconds... We the above, there should be at least 4 processes that don't disappear before 10 handling 10 connections. But if more/other processes are created because of the load, they would be recycled as soon as the load decreases. What do you observe with the below ? StartServers4 ServerLimit 80 MinSpareServers 4 MaxSpareServers 40 MaxRequestWorkers 80 MaxConnectionsPerChild 0 Regards, Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Question about apache2.4, prefork and mod_perl
On Wed, Sep 13, 2017 at 9:56 AM, Yann Ylavic wrote: > > Please have a look at http://httpd.apache.org/docs/2.4/fr/mod/prefork.html. Sorry, http://httpd.apache.org/docs/2.4/mod/prefork.html or http://httpd.apache.org/docs/2.4/de/mod/prefork.html might be more appropriate... - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] Question about apache2.4, prefork and mod_perl
Hi, On Wed, Sep 13, 2017 at 9:11 AM, Norbert wrote: > > So: I am running apache 2.4 (on FreeBSD 11), use mod_perl and prefork. When > the server starts it creates several httpd processes all running under root. > This is ok. When a request arrives it creates subprocesses with the user > www:www (80:80) - everything ok. But now the question: why are the > processes with www:www user terminated after a short time / request? > Meaning: if I wait a short time, the mod_perl modules have allways been > "reinitailized", as far as I can so from my debugging output. Is there a way > to keep a fixed number of processes under www:www running - at least for > hours? I hope I could explain... Please have a look at http://httpd.apache.org/docs/2.4/fr/mod/prefork.html. The relevant directives are MinSpareServers and MaxSpareServers for the number of running processes, and MaxConnectionsPerChild for their lifetime. Regards, Yann. - To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org