Web Hosting Talk







View Full Version : Identify httpd processes


md2001
01-29-2002, 12:23 PM
I'm experiencing extremely high server loads from time to time. Most of the time everything is normal, load is between 0.3 - 0.5, but every once in a while it just goes sky-high, over 50 or even 80. The server usually freezes when this happens.

When I run top or ps aux, I see many httpd processes and many mySQL connections. It seems to me that the problem is caused by some PHP script that connects to mySQL.

How can I find out which script is that? How can I see what a certain httpd process actually represents? Top and ps aux only say "httpd".

There are no high-load sites on the server, so there must be something wrong with the scripts.

Anatole
01-29-2002, 12:43 PM
You can try running all phps as CGI and use SUEXEC to indentify users.

Also, you may put a scipt in cron, which will reboot server in case load average is over 30 (50) and notify your pager when it happens.

H2
01-29-2002, 06:44 PM
just enable "server-status" in apache httpd.conf

goodluckhost
03-13-2006, 11:58 PM
ding zai ding

kebirhost
03-14-2006, 10:58 AM
Hello,

You can use lsof -pID of the process | more

007007
03-17-2006, 11:31 AM
up
i have the same problem as his

InstaCarma_Rose
03-18-2006, 06:01 AM
I'm experiencing extremely high server loads from time to time. Most of the time everything is normal, load is between 0.3 - 0.5, but every once in a while it just goes sky-high, over 50 or even 80. The server usually freezes when this happens.

When I run top or ps aux, I see many httpd processes and many mySQL connections. It seems to me that the problem is caused by some PHP script that connects to mySQL.

How can I find out which script is that? How can I see what a certain httpd process actually represents? Top and ps aux only say "httpd".

There are no high-load sites on the server, so there must be something wrong with the scripts.

If you need to find out which is the php script that is connecting to mysql, here's a small work around. Keep the Apache server running, and STOP mysql server. If you tail the Apache error_log at this point, all the scripts trying to connect to the Mysql server would show up in the logs with mysql connectivity failure.

Regards,
Rose
rose@instacarma.com