ID: 24597 Updated by: [EMAIL PROTECTED] Reported By: jordan at tumyeto dot net -Status: Open +Status: Bogus Bug Type: Apache related Operating System: RedHat 2.4.7-10smp PHP Version: 4.3.2 New Comment:
I can't reproduce this. Previous Comments: ------------------------------------------------------------------------ [2003-07-10 18:14:41] jordan at tumyeto dot net Description: ------------ Summary: If the directory containing error_log is not writeable, Apache gets stuck taking 100% CPU. Detail: I recently set log_errors = On in php.ini, and began receiving a TON of "[notice] child pid 15591 exit signal Segmentation fault (11)" in my Apache error_log. In addition, a ton of "Allowed memory size of 8388608 bytes exhausted (tried to allocate 2 bytes)" began showing up as well. Even worse, Apache child threads would shoot up to 100% CPU and over time 5-6 threads would all be fighting for that 100%, causing page serve problems. I come to find out that the directoy that error_log was set to go to was not writeable by the webserver user. As soon as I make the directory writeable (or turn off log_errors), all problems go away and the server returns to normal operations. './configure' '--prefix=/usr/local' '--with-apache=/usr/local/Apachetoolbox-1.5.66/apache_1.3.27' '--enable-exif' '--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx' '--enable-ftp' '--enable-inline-optimization' '--enable-memory-limit' '--with-gd=/usr/local' '--with-zlib' '--enable-gd-native-tt' '--with-t1lib=/usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/usr/local' '--with-imap=/usr/sbin' '--with-openssl=/usr' '--with-gd' '--with-zlib-dir=/usr' '--with-png-dir=/usr' '--with-jpeg-dir=/usr' '--with-mysql' '--with-ldap' '--with-kerberos=/usr/kerberos' Reproduce code: --------------- 1) Enable log_errors in php.ini 2) Set error_log to a directory not writeable by the webuser. 3) Create some php errors that you would expect to be logged into error_log. 4) Send a lot of traffic to the server, watch your Apache's error_log and watch Apache threads shoot up to 100% CPU. Expected result: ---------------- If error_log cannot be written, abort instead of taking down Apache. Actual result: -------------- [notice] child pid 15591 exit signal Segmentation fault (11) Allowed memory size of 8388608 bytes exhausted (tried to allocate 2 bytes) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24597&edit=1