Discussion:
Apache 2.2 worker MPM on 32-bit BSD system
(too old to reply)
The Doctor
2014-10-11 04:07:58 UTC
Permalink
Finally recompiled Apache to Worker MPM.


I am wondering why I am getting 503 errors rather frequently.

The load is good, but the WCPU and CPU are high in top and

the CPU load is 193% ?? when I do a server-status.

All right what do I need to tweek?
--
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k Look at Psalms 14 and 53 on Atheism
Danger comes when our feelings outweigh reality. -unknown
The Doctor
2014-10-11 13:51:17 UTC
Permalink
Post by The Doctor
Finally recompiled Apache to Worker MPM.
I am wondering why I am getting 503 errors rather frequently.
The load is good, but the WCPU and CPU are high in top and
the CPU load is 193% ?? when I do a server-status.
All right what do I need to tweek?
Addendum:

I seem to be running out of semaphores.

semget error.
--
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k Look at Psalms 14 and 53 on Atheism
Danger comes when our feelings outweigh reality. -unknown
The Doctor
2014-10-11 22:15:48 UTC
Permalink
Post by The Doctor
Post by The Doctor
Finally recompiled Apache to Worker MPM.
I am wondering why I am getting 503 errors rather frequently.
The load is good, but the WCPU and CPU are high in top and
the CPU load is 193% ?? when I do a server-status.
All right what do I need to tweek?
I seem to be running out of semaphores.
semget error.
Here we go again.

Finally got control ofthe server on an old 32-bit system.

Right I am getting the odd 503 error.

A sample top session

load averages: 5.25, 4.02, 3.63 16:12:10
109 processes: 6 running, 103 sleeping
CPU states: 25.4% user, 0.2% nice, 50.7% system, 0.0% interrupt, 23.8% idle
Memory: Real: 1089M/1562M Virt: 2679M/4019M Free: 1829M

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
8592 www 103 4 149M 136M run/7 10:57 86.62% 86.62% httpd
9642 www 102 0 116M 113M run/6 0:45 69.22% 67.14% httpd
9572 www 104 0 128M 113M run/1 1:09 62.78% 62.65% httpd
9619 www 107 0 146M 131M run/1 0:42 59.08% 57.76% httpd
9574 www -5 0 152M 173M sleep 0:49 26.23% 26.17% httpd

And the layout.

From httpd-mpm.conf

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
ThreadLimit 16
StartServers 8
ServerLimit 16
MaxClients 160
MinSpareThreads 25
MaxSpareThreads 150
ThreadsPerChild 16
MaxRequestsPerChild 000
</IfModule>

FRom httpd.conf


KeepAlive On
KeepAliveTimeOut 15
MaxKeepAliveRequests 15
TimeOut 15

AcceptMutex fcntl

and from httpd-default.conf

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 15

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 15

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

End of conf snippet.

How Do I minimise the 503 errors?

Also


LoadModule reqtimeout_module /usr/contrib/libexec/apache/mod_reqtimeout.so
LoadModule php5_module /usr/contrib/libexec/apache/libphp5.so
#LoadModule dav_svn_module /usr/contrib/libexec/apache/mod_dav_svn.so
#LoadModule authz_svn_module /usr/contrib/libexec/apache/mod_authz_svn.so
#LoadModule clamav_module /usr/contrib/libexec/apache/mod_clamav.so
LoadModule evasive20_module /usr/contrib/libexec/apache/mod_evasive20.so
LoadModule fastcgi_module /usr/contrib/libexec/apache/mod_fastcgi.so
LoadModule fortress_module /usr/contrib/libexec/apache/mod_fortress.so
LoadModule security2_module /usr/contrib/libexec/apache/mod_security2.so
LoadModule dosevasive20_module /usr/contrib/libexec/apache/mod_dosevasive20.so
LoadModule fcgid_module /usr/contrib/libexec/apache/mod_fcgid.so
LoadModule limits_module /usr/contrib/libexec/apache/mod_limits.so
#LoadModule csrf_module /usr/contrib/libexec/apache/mod_csrf.so
#LoadModule ipblock_module /usr/contrib/libexec/apache/mod_ipblock.so
LoadModule limitipconn_module /usr/contrib/libexec/apache/mod_limitipconn.so
LoadModule bw_module /usr/contrib/libexec/apache/mod_bw.so
LoadModule qos_module /usr/contrib/libexec/apache/mod_qos.so
LoadModule bwshare_module /usr/contrib/libexec/apache/mod_bwshare.so
Post by The Doctor
--
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k Look at Psalms 14 and 53 on Atheism
Danger comes when our feelings outweigh reality. -unknown
--
Member - Liberal International This is doctor@@nl2k.ab.ca Ici doctor@@nl2k.ab.ca
God,Queen and country!Never Satan President Republic!Beware AntiChrist rising!
http://www.fullyfollow.me/rootnl2k Look at Psalms 14 and 53 on Atheism
Danger comes when our feelings outweigh reality. -unknown
Loading...