-
Appropiate Configuration for Startup and Standby Servers
Posted on May 26th, 2009 No commentsI have been having an issue with my apache server at random times stop responding. I would restart it and it would be on its merry way. After the last time I turned up logging on the production machine and kept an eye on it, once it happened again I went into the error logs and picked up this gem.
“[Wed Apr 01 19:07:38 2009] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 7 idle, and 48 total children”
there were several of these and then a few more lines of “[Wed Apr 01 19:07:38 2009] [debug] proxy_util.c(1778): proxy: initialized single connection worker 0 in child 21005 for (*)” and then nothing until I restarted. From the looks of it I should up the StartServers and Min/MaxSpareServers, but this is where I dont really understand a whole lot about the httpd.conf file and what to set, so if someone could look over my settings and information and point me in the right direction or even just tell my dense headed self I would appreciate it .. oh and shower you with Points.
httpd.conf
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process servesStartServers 16
MinSpareServers 10
MaxSpareServers 20
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 4000# 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 servesStartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0#free -mt
total used free shared buffers cached
Mem: 998 967 31 0 173 560
-/+ buffers/cache: 233 765
Swap: 2008 28 1979
Total: 3006 995 2011#/sbin/swapon -s
Filename Type Size Used Priority
/dev/sda5 partition 2056280 28876 -1#/usr/sbin/httpd -v
Server version: Apache/2.2.8 (Unix)# /usr/sbin/httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.cYou can use Monit to monitor httpd service it will alert you if there is any problem and will restart the server
http://www.howtoforge.com/server-monitoring-with-munin-and-monit-on-centos-5.2
omm i dont think its memory, as the log said , you need to increate the prefork beause you are runnign out
so when this problem happen, try to incrase your prefork setting , see if that help
but your free ram is low… when this problem happended, check the Ram and processor utilization, just check if they are not running out …




Recent Comments