Forum Moderators: phranque

Message Too Old, No Replies

Which website started a thread/process id?

         

wheel

12:44 pm on Nov 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got something running on my server that's causing threads to stick around. When I restart apache, it won't because there's always a bunch of non-dead threads. I have to do a ps aux¦grep httpd, get all the remnant process id's and kill them all individually.

I'd like to find out what website or program is causing this. Is there any way to find out which program or site is behind a particular apache process id?

jdMorgan

1:48 pm on Nov 17, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does this search [google.com] help?

Jim

wheel

7:43 pm on Nov 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sort of but not quite. I read quite a bit there and it's all rather close.

is there any other way one would suggest I start debugging this? All I've got right now is that when I restart apache, I've got 100 dead threads every time that I have to kill -9 manually each one, every time. I'd like to figure what process is keeping these threads alive.

techhie

10:07 am on Dec 1, 2009 (gmt 0)

10+ Year Member



Wheel

I am having the same problem. I cannot find out why certain apache processes are hanging. Until i find a resolution, i made a small script, and i am doing a cron every few minutes to kill the hanging sessions. The bad thing is, there might be some legitimate sessions as well that might get killed, but in my case, i dont have an option, as apache reaches a stage where it does not accept any connections anymore.

#!/bin/bash
rm kill_apache.sh
echo "#!/bin/bash" > kill_apache.sh
echo " " >> kill_apache.sh
ps -ef ¦ grep -i httpd ¦ awk /^apache/{'print "kill -9 " $2'} >> kill_apache.sh
chmod +x kill_apache.sh
./kill_apache.sh