LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-25-2010, 08:07 AM   #1
imi@tux
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, 05:35 PM   #2
paulsm4
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, 11:17 AM   #3
bmarx
Member
 
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:

http://httpd.apache.org/docs/2.0/mod/mod_status.html
 
Old 01-07-2011, 05:25 AM   #4
imi@tux
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...
 
  


Reply

Tags
apache, hangs, process



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 06:32 AM
My sendmail process hangs on boot up guarriman Fedora 1 11-13-2006 10:07 AM
LILO hangs during the boot process ntoughe Linux - General 3 11-18-2005 10:44 AM
Boot process hangs while dcetecting hardware jmilks Slackware - Installation 2 02-10-2005 06:46 AM
smbmount process hangs around ericcarlson Red Hat 0 07-21-2004 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:57 AM.

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