You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oleksandr Samoylyk <ol...@samoylyk.sumy.ua> on 2006/12/16 23:10:40 UTC
[users@httpd] Apache httpd & "W" Sending Reply
Dear Subscribers,
I've some problems with Apache under high load (usually more than > 512
clients).
When httpd runs for several days some of the slots hung while 'Sending
Reply'.
When I enter server-status I see the following (BTW, it's not a "rush
hour"):
Current Time: Friday, 15-Dec-2006 08:50:44 EET
Restart Time: Tuesday, 12-Dec-2006 09:10:53 EET
Parent Server Generation: 0
Server uptime: 2 days 23 hours 39 minutes 50 seconds
Total accesses: 6442835 - Total Traffic: 86.3 GB
CPU Usage: u3302.37 s375.414 cu.265625 cs0 - 1.43% CPU load
25 requests/sec - 350.6 kB/second - 14.0 kB/request
62 requests currently being processed, 58 idle workers
WWWWWWWWWW......................................................
................................................................
________K_......................................................
WWWWWWWWWW......................................................
................................................................
_K____K___......................................................
_________K......................................................
K___K_____......................................................
W___K_K___......................................................
WWWWWWWWW.......................................................
WWWWWWWWWW......................................................
WWWWWWWWWW......................................................
WWWWWWWWWW......................................................
................................................................
I use:
# uname -a
FreeBSD webhosting.xxxxx.net 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Fri Jun
9 08:45:16 EEST 2006
# httpd -V
Server version: Apache/2.2.3
Server built: Nov 30 2006 00:43:16
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/worker"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-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_SCOREBOARD="/var/run/apache_runtime_status"
-D DEFAULT_ERRORLOG="/var/log/httpd-error.log"
-D AP_TYPES_CONFIG_FILE="etc/apache22/mime.types"
-D SERVER_CONFIG_FILE="etc/apache22/httpd.conf"
# php -v
PHP 4.4.4 with Suhosin-Patch 0.9.5 (cli) (built: Nov 30 2006 00:52:20)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by
eAccelerator
# mysql -V
mysql Ver 14.7 Distrib 4.1.22, for portbld-freebsd6.1 (amd64) using 5.0
Some settings from httpd.conf:
Timeout 30
KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 2
<IfModule mpm_worker_module>
StartServers 2
ServerLimit 80
MaxClients 800
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 10
MaxRequestsPerChild 0
</IfModule>
Why does it happen? How can I prevent it?
Thank you!
--
Oleksandr Samoylyk
OVS-RIPE
---------------------------------------------------------------------
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 httpd & "W" Sending Reply
Posted by Sander Temme <sc...@apache.org>.
On Dec 16, 2006, at 2:10 PM, Oleksandr Samoylyk wrote:
> Server MPM: Worker
> threaded: yes (fixed thread count)
> forked: yes (variable process count)
<..>
>
> # php -v
> PHP 4.4.4 with Suhosin-Patch 0.9.5 (cli) (built: Nov 30 2006 00:52:20)
> Copyright (c) 1997-2004 The PHP Group
> Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
> with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by
> eAccelerator
PHP may be kind of an unknown under threaded servers. While it is
commonly stated that the PHP core should not have any problems with
threading, you may have compiled in libraries that are not
threadsafe, and can give you strange and untractable problems under
load.
Perhaps you might do better with the prefork MPM?
S.
--
sctemme@apache.org http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4 B7B8 B2BE BC40 1529 24AF