4

I have a PHP web application running on Apache/mod_php that works fine for several days and then fails, returns 500 Internal Server Error.

I've turned on debug logging and do not see anything in the logs that points to a cause. The only way to fix the issue is to restart Apache.

I think I need to run a system trace to monitor the Apache process and force it fail using Apache bench or other load test tool. Problem is, I've never done this before so I'm not sure how I would go about it.

I am running CentOS 6.x. What tool would I use to run a system trace and how would I invoke it?

3

You can try strace

strace -f -p 22254 -s 80 -o /tmp/debug.lighttpd.txt

-p will be the PID of the apache process, this thread helps you finding it

| improve this answer | |
  • 1
    Combine with -f to watch the child threads also, you almost always want this. – Adam Gibbins Dec 24 '15 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.