[PHP-DEV] Bug #11676: A few apache children consume all memory and CPU. From: valerio <email protected>
Date: 06/25/01

From: valerio <email protected>
Operating system: linux 2.4.5 i386
PHP version: 4.0 Latest CVS (2001-06-25)
PHP Bug Type: Performance problem
Bug description: A few apache children consume all memory and CPU.

I'm using php 4.0.7-dev (downloaded from the CVS tree), Apache 1.3.20 on a P3 600 1 Gig RAM.
After some hours that the server is running, in no particularly loaded confdition, CPU and memory utilization grows abnormally, making the server unusable.
"top" shows that 4 o 5 httpd processes are eating 20% CPU each, and are all in "running" state. I managed to attach a gdb to one of these processes, and here's the result:

Attaching to program `/usr/local/apache/bin/httpd', Pid 21784
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libdb.so.3...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_compat.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
0x4012c23e in chunk_free ()
(gdb) bt
#0 0x4012c23e in chunk_free ()
#1 0x4012bfaa in __cfree ()
#2 0x80fbcbf in shutdown_memory_manager ()

This is all I get. I saw MANY MANY bug reports with similarities to this one in the db. The only solution is stopping and restarting apache. In apache's error_log i get many lines with "child xxx still did not exit...sending a SIGTERM" and "child xxx still did not exit...sending a SIGKILL" as soon as i stop it.
Let me know if I can make something to help you out more!

-- 
Edit Bug report at: http://bugs.php.net/?id=11676&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>