apache2.2 + php5 , process never die and stay blocked to LOCK_SH
Posted
by
Givre
on Server Fault
See other posts from Server Fault
or by Givre
Published on 2012-03-29T05:09:08Z
Indexed on
2012/03/29
5:31 UTC
Read the original article
Hit count: 377
Server version: Apache/2.2.22 (Unix)
Server built: Mar 28 2012 16:31:45
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.6, APR-Util 1.4.1
Compiled using: APR 1.4.6, APR-Util 1.4.1
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_SYSVSEM_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="/opt/apache2"
-D SUEXEC_BIN="/opt/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Php5.2.17. Using mod_php5 as a DSO module compiled
Problem:
On shared webhosting, a lot of apache2 process never stop or die and they waiting as long as apache2 restart.
Strace of one of theses process:
access("tmp/meta_cache.txt", F_OK) = 0
getcwd("/home/exemple.com/htdocs"..., 4096) = 34
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=1715, ...}) = 0
lstat("/home/exemple.com", {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
lstat("/home/exemple.com/htdocs", {st_mode=S_IFDIR|0770, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp", {st_mode=S_IFDIR|0777, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp/meta_cache.txt", {st_mode=S_IFREG|0666, st_size=8901, ...}) = 0
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=1715, ...}) = 0
lstat("/home/exemple.com", {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
lstat("/home/exemple.com/htdocs", {st_mode=S_IFDIR|0770, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp", {st_mode=S_IFDIR|0777, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp/meta_cache.txt", {st_mode=S_IFREG|0666, st_size=8901, ...}) = 0
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=1715, ...}) = 0
lstat("/home/exemple.com", {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
getcwd("/home/exemple.com/htdocs"..., 4096) = 34
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/www", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home", {st_mode=S_IFDIR|0755, st_size=1715, ...}) = 0
lstat("/home/exemple.com", {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
lstat("/home/exemple.com/htdocs", {st_mode=S_IFDIR|0770, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp", {st_mode=S_IFDIR|0777, st_size=51, ...}) = 0
lstat("/home/exemple.com/htdocs/tmp/meta_cache.txt", {st_mode=S_IFREG|0666, st_size=8901, ...}) = 0
open("/home/exemple.com/htdocs/tmp/meta_cache.txt", O_RDONLY) = 10905
fstat(10905, {st_mode=S_IFREG|0666, st_size=8901, ...}) = 0
lseek(10905, 0, SEEK_CUR) = 0
flock(10905, LOCK_SH) =
The process never die, and stay like this. All files are on NFS V3
I'dont know how to solve this problem or find more informations. The effect is that all apache2 process become used and apache2 crash totaly .
Thanks for you help.
© Server Fault or respective owner