Forum Moderators: phranque

Message Too Old, No Replies

A way trace the source that is causing httpd process overload?

httpd process problem

         

santocki

6:30 pm on Jun 23, 2007 (gmt 0)

10+ Year Member



There is a httpd process overload problem that occurs in every 2 or 3 days on my server. It's not because I have tons of visitors on my website because it's not a busy site (500 visitors per day) using a Pentium 4 server with 2GB memory.

My server uses PHP 4.3.11 and MySQL 4.1.20 and the site is dynamic using PHP.

I have to kill that httpd process by restarting the Apache server because it just hangs on there when you execute TOP command in linux, and it's consuming 90% to 100% CPU alone!

I am a newbie to Linux and Apache, is there a way or a tool to trace down the name of the PHP script file (line number if possible) or Apache mod that is causing the overload? Because "httpd" is not very informative and I don't know where to even start to find the source problem, thank you.

santocki

7:33 pm on Jun 23, 2007 (gmt 0)

10+ Year Member



Oh, by the way, I have tried using the ps command like:

ps aux ¦ grep apache

it returned

apache 15035 4.3 0.4 22492 8800? S 14:18 0:33 /usr/sbin/httpd -DSSL
apache 15386 5.2 0.4 22384 8616? S 14:24 0:22 /usr/sbin/httpd -DSSL
apache 15792 4.8 0.4 22640 8876? R 14:24 0:19 /usr/sbin/httpd -DSSL
apache 15888 4.1 0.4 22368 8588? S 14:26 0:12 /usr/sbin/httpd -DSSL
apache 15890 3.6 0.4 22312 8604? S 14:26 0:10 /usr/sbin/httpd -DSSL
apache 15894 3.3 0.4 22372 8592? S 14:27 0:07 /usr/sbin/httpd -DSSL
apache 16149 3.8 0.4 22320 8540? S 14:29 0:04 /usr/sbin/httpd -DSSL
apache 16151 5.6 0.4 22464 8684? S 14:29 0:05 /usr/sbin/httpd -DSSL
apache 16183 4.8 0.4 22372 8592? S 14:30 0:03 /usr/sbin/httpd -DSSL
apache 16241 4.6 0.4 22576 8780? S 14:30 0:03 /usr/sbin/httpd -DSSL
root 16257 0.0 0.0 6172 632 pts/0 R+ 14:31 0:00 grep apache

So "/usr/sbin/httpd -DSSL" returned for every apache's process which isn't a much help because it's all the same and does not profile the script file name information.