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

Re: apache uses 100 % cpu



On Sat, 2004-02-28 at 10:14, Timo Veith wrote:
> This is the output of strace:
> ....
> read(8, "", 4096)                       = 0
> read(8, "", 4096)                       = 0
> read(8, "", 4096)                       = 0
> read(8, "", 4096)                       = 0
> ....  looping forever as it seems.


First of all, let me compliment you on the good level of detail you've
provided in your request for trouble-shooting aid.  If these processes
are still running, I'd really like to see what is on descriptor 8 of the
process that generated the above strace output.  To find that out, make
sure you have the "lsof" package installed, and issue `lsof -p <PID>`,
then take note of the FD column in the output.  That indicates which
file descriptor is being examined, and of course the information in the
remaining columns to the right are details about that descriptor.

I can't imagine why apache itself would be caught in the scenario you
are experiencing, but perhaps a CGI/PHP script or buggy module is the
culprit.  If that is the case, simple knowledge of what apache is trying
to read may be helpful.

If you have gdb available (from the gdb package) and your apache binary
is not stripped of debugging symbols, you can also issue `gdb -p <PID>`,
which will attach the debugger to that running process.  I'm not sure
what the output will look like as it's issuing garbage reads constantly,
but you want to issue the gdb command `backtrace`, and send that output
to the mailing list.  Just issue `q` after you've got that to detach.

What version of Apache are you running, and with what modules?

--
Jeff



Reply to: