You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Patrick Proniewski <pa...@univ-lyon2.fr> on 2011/06/15 09:53:08 UTC
[users@httpd] Apache status reports twice the number of total workers
Hello,
I'm using Munin to monitor few Apache servers.
The apache_processes plugin parse the output of http://127.0.0.1:80/server-status?auto , which looks like this:
Total Accesses: 20492
Total kBytes: 833698
CPULoad: .0142742
Uptime: 67703
ReqPerSec: .302675
BytesPerSec: 12609.6
BytesPerReq: 41660.5
BusyWorkers: 3
IdleWorkers: 9
Scoreboard: __._.__._..___.KKW..................**cut**......................................
BusyWorkers and IdleWorkers numbers are ok. But Scoreboard displays twice the real number of slots configured in httpd config.
I have this config:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 128
MaxRequestsPerChild 10000
</IfModule>
I expect Scoreboard to display 128 slots, but it displays 256. Does it come from the fact I'm running Apache on ports 80 AND 443?
regards,
Patrick PRONIEWSKI
--
Administrateur Système - DSI - Université Lumière Lyon 2
Re: [users@httpd] Apache status reports twice the number of total workers
Posted by Patrick Proniewski <pa...@univ-lyon2.fr>.
On 15 juin 2011, at 15:18, Eric Covener wrote:
>> On the first one (running only on port 80), the Scoreboard properly display 128 slots.
>
> Does this system use the ServerLimit directive?
Oh. You got me. I've added this directive on the first server a while ago, and totally forgot about it. Thank you !
Patrick PRONIEWSKI
--
Administrateur Système - DSI - Université Lumière Lyon 2
Re: [users@httpd] Apache status reports twice the number of total workers
Posted by Eric Covener <co...@gmail.com>.
On Wed, Jun 15, 2011 at 8:57 AM, Patrick Proniewski
<pa...@univ-lyon2.fr> wrote:
> On 15 juin 2011, at 13:25, Bostjan Skufca wrote:
>
>> This is the extract from source file server/mpm/prefork/prefork.c:
>> ../..
>> #ifndef DEFAULT_SERVER_LIMIT
>> #define DEFAULT_SERVER_LIMIT 256
>> #endif
>
> I would say "ok", if all my servers would behave the same. But no.
> On two almost identical servers, I have MaxClients set to 128.
>
> On the first one (running only on port 80), the Scoreboard properly display 128 slots.
Does this system use the ServerLimit directive?
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Apache status reports twice the number of total workers
Posted by Patrick Proniewski <pa...@univ-lyon2.fr>.
On 15 juin 2011, at 13:25, Bostjan Skufca wrote:
> This is the extract from source file server/mpm/prefork/prefork.c:
> ../..
> #ifndef DEFAULT_SERVER_LIMIT
> #define DEFAULT_SERVER_LIMIT 256
> #endif
I would say "ok", if all my servers would behave the same. But no.
On two almost identical servers, I have MaxClients set to 128.
On the first one (running only on port 80), the Scoreboard properly display 128 slots.
$ httpd -V
Server version: Apache/2.2.19 (FreeBSD)
Server built: Jun 3 2011 10:35:04
Server's Module Magic Number: 20051115:28
Server loaded: APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.10
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local"
-D SUEXEC_BIN="/usr/local/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="etc/apache22/mime.types"
-D SERVER_CONFIG_FILE="etc/apache22/httpd.conf"
On the second one, running on both ports 80 and 443, the Scoreboard stays at 256 slots.
$ httpd -V
Server version: Apache/2.2.17 (FreeBSD)
Server built: Oct 27 2010 11:00:39
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.10
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FLOCK_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local"
-D SUEXEC_BIN="/usr/local/bin/suexec"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="etc/apache22/mime.types"
-D SERVER_CONFIG_FILE="etc/apache22/httpd.conf"
>
> On 15 June 2011 09:53, Patrick Proniewski
> <pa...@univ-lyon2.fr>wrote:
>
>> Hello,
>>
>> I'm using Munin to monitor few Apache servers.
>> The apache_processes plugin parse the output of
>> http://127.0.0.1:80/server-status?auto , which looks like this:
>>
>> Total Accesses: 20492
>> Total kBytes: 833698
>> CPULoad: .0142742
>> Uptime: 67703
>> ReqPerSec: .302675
>> BytesPerSec: 12609.6
>> BytesPerReq: 41660.5
>> BusyWorkers: 3
>> IdleWorkers: 9
>> Scoreboard:
>> __._.__._..___.KKW..................**cut**......................................
>>
>> BusyWorkers and IdleWorkers numbers are ok. But Scoreboard displays twice
>> the real number of slots configured in httpd config.
>>
>> I have this config:
>>
>> <IfModule mpm_prefork_module>
>> StartServers 5
>> MinSpareServers 5
>> MaxSpareServers 10
>> MaxClients 128
>> MaxRequestsPerChild 10000
>> </IfModule>
>>
>> I expect Scoreboard to display 128 slots, but it displays 256. Does it come
>> from the fact I'm running Apache on ports 80 AND 443?
>>
>>
>> regards,
>>
>> Patrick PRONIEWSKI
>> --
>> Administrateur Système - DSI - Université Lumière Lyon 2
>>
>>
Patrick PRONIEWSKI
--
Administrateur Système - DSI - Université Lumière Lyon 2
Re: [users@httpd] Apache status reports twice the number of total workers
Posted by Bostjan Skufca <bo...@a2o.si>.
This is the extract from source file server/mpm/prefork/prefork.c:
----------------------------------------------------------------------------------------
/* Limit on the total --- clients will be locked out if more servers than
* this are needed. It is intended solely to keep the server from crashing
* when things get out of hand.
*
* We keep a hard maximum number of servers, for two reasons --- first off,
* in case something goes seriously wrong, we want to stop the fork bomb
* short of actually crashing the machine we're running on by filling some
* kernel table. Secondly, it keeps the size of the scoreboard file small
* enough that we can read the whole thing without worrying too much about
* the overhead.
*/
#ifndef DEFAULT_SERVER_LIMIT
#define DEFAULT_SERVER_LIMIT 256
#endif
----------------------------------------------------------------------------------------
b.
On 15 June 2011 09:53, Patrick Proniewski
<pa...@univ-lyon2.fr>wrote:
> Hello,
>
> I'm using Munin to monitor few Apache servers.
> The apache_processes plugin parse the output of
> http://127.0.0.1:80/server-status?auto , which looks like this:
>
> Total Accesses: 20492
> Total kBytes: 833698
> CPULoad: .0142742
> Uptime: 67703
> ReqPerSec: .302675
> BytesPerSec: 12609.6
> BytesPerReq: 41660.5
> BusyWorkers: 3
> IdleWorkers: 9
> Scoreboard:
> __._.__._..___.KKW..................**cut**......................................
>
> BusyWorkers and IdleWorkers numbers are ok. But Scoreboard displays twice
> the real number of slots configured in httpd config.
>
> I have this config:
>
> <IfModule mpm_prefork_module>
> StartServers 5
> MinSpareServers 5
> MaxSpareServers 10
> MaxClients 128
> MaxRequestsPerChild 10000
> </IfModule>
>
> I expect Scoreboard to display 128 slots, but it displays 256. Does it come
> from the fact I'm running Apache on ports 80 AND 443?
>
>
> regards,
>
> Patrick PRONIEWSKI
> --
> Administrateur Système - DSI - Université Lumière Lyon 2
>
>