Apache 2 problems with spawning processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

we have installed apache 2 on centos 5 system and we have a big problem
with spawning too much child processes. These are the versions that we
use:


Centos 5.2 x86_64
httpd-2.2.8-jason.3
php-5.2.6-1.el5.remi
mysql-5.0.45-7.el5

System has 2xquat processor (total 8 cores) and 16 GB RAM


We have this configuration for prefork MPM and timeouts:

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

#
# 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 500

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

##
## Server-Pool Size Regulation (MPM specific)
## 

# 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
serves
<IfModule prefork.c>
StartServers       5
MinSpareServers    5
MaxSpareServers   20
ServerLimit      250
MaxClients       250
MaxRequestsPerChild  5000
</IfModule>

Apache and mysql works fine around 20 hours, and then in some moment
apache start to spawn a lot of processes until stop to handle requests.

I checked with top,mytop,apachetop our system and what i saw is this.
When this happen apachetop (parse server-status result) shows that there
are a lot of requests with "W" mode and at the same time i see a lot of
not finished threads and queries in mytop (run time monitoring of
mysql).

In top and other system monitoring tools i see that memory is ok. There
is enough free memory. System does not swap, but CPU usage from mysql
and apache is getting too high. Apache is spawning and mysql cannot
handle these requests. It use also too much CPU during this time.

What i cannot understand is why there are so many requests with "W" mode
in server-status page. Of course this is not happen every time. Maybe 2
times per day, but i need to find out why this happen and to try to fix
this problem.

What can be the problem, how to troubleshoot this and undestand what
exactly happens?

Thanks in advanced!

Regards, Ali Nebi!


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux