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

Re: apache uses 100 % cpu

On Sat, 2004-02-28 at 13:48, Timo Veith wrote:
> apache  24290 root    8r   REG   8,17     13115 25739308 /home/jebu0001/homepage/jens/chat/php_chat_log

> I tried gdb, but there are no debug symbols,
> that's the default with most debian packages I assume.

It's a shame the debug symbols aren't available.  If this happens on a
routine basis, I would definately suggest rebuilding apache and all its
modules with debugging symbols left in.

Barring that, though, what your apache processes are doing is trying to
read that file, /home/jebu0001/homepage/jens/chat/php_chat_log, over and
over again, most likely in a `tail -f` nature, but no new data is
appearing.  Without question, if you were to fire up strace again, and
append a few bytes to that file, they would show up in your strace
output as bytes being read.

Unfortunately apache does not have any .php files or similar still open,
so it may be difficult to identify exactly what script the culprit is. 
In any case, I would contact that user and tell them that PHP script is
causing you grief, and have them stop running it.

PHP is the single biggest cause of shared server problems at my company.
I wish the PHP CGI stuff worked right, as if it did, we would opt to use
that instead of the Apache PHP module.  It may be slower, but at least
that would limit what users can fuck up with third-party PHP scripts. :(

I hope this helps!

Jeff S Wheeler

Reply to: