Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-25-2010, 09:07 AM   #1
LQ Newbie
Registered: Oct 2004
Location: Wasa, Finland
Distribution: debian
Posts: 23

Rep: Reputation: 15
Apache process hangs

Hello happy hackers!

I have this webserver running multiple websites as virtual hosts. I suddenly noticed (using top) that some of the apache processes hang. I can narrow down the problem to a single site with the command lsof +p PID, but I can't get any closer the problem. Is there a way to get a more detailed report of similar problems? I checked my logs but sadly can't find anything useful.
Old 11-26-2010, 06:35 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Sure - many ways.

The best/easiest is to look at the access log (e.g. /var/logs/apache2/access_log) and see what the last request was, and if it had anything to do with the "hang".

The Apache error log (e.g. "error_log") should be in the same directory. Look there, too.

Other tools might include:
* lsof: see what files/ports the process is using

* tcpdump or wireshark: take a network trace when the "hang" occurs.
Who knows - maybe you'll discover that the CLIENT might be at fault

* gdb: you can attach to the live, "hung" process and get a stack traceback (of exactly where it's hanging)

* Etc

'Hope that helps .. and Good Luck!

Please post back what you find!
Old 11-27-2010, 12:17 PM   #3
Registered: Dec 2004
Distribution: Slackware, Arch, FreeBSD
Posts: 202

Rep: Reputation: 34
You could also use mod_status to try to get a better insight into the problem:
Old 01-07-2011, 06:25 AM   #4
LQ Newbie
Registered: Oct 2004
Location: Wasa, Finland
Distribution: debian
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for the advices!

However, wireshark was the one that hunted the problem down. A php-script that was looping and looping and looping...


apache, hangs, process

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.2.3 - unknown Apache process child ittec Linux - Server 1 06-03-2008 07:32 AM
My sendmail process hangs on boot up guarriman Fedora 1 11-13-2006 11:07 AM
LILO hangs during the boot process ntoughe Linux - General 3 11-18-2005 11:44 AM
Boot process hangs while dcetecting hardware jmilks Slackware - Installation 2 02-10-2005 07:46 AM
smbmount process hangs around ericcarlson Red Hat 0 07-21-2004 06:23 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration