How do I find and kill a php loop (process)?

Posted by Hoytman on Super User See other posts from Super User or by Hoytman
Published on 2014-08-19T20:56:02Z Indexed on 2014/08/19 22:23 UTC
Read the original article Hit count: 160

Filed under:
|
|
|
|

I have a php script that I have been developing which calls an external api within a loop. It is being tested on a VPS which is running LAMP on Debian. I noticed this morning that the api was not responding to my script. When I called the provider, they told me that my server had been calling the api 1000's of times per hour for the past 10 hours. I am assuming that a php script (which I have been working on the day before and testing on my VPS) entered into an infinite loop during one of the executions, and never came out (I have been testing it from the command prompt, and not over the web.) I have attempted to stop and start Apache, but the api support staff says that the calls are still coming in from my server address. How can I find and stop the process? Also, is there a possibility that the Apache stop/start solved the problem, but the api is still trying to sort through past calls?

Please forgive me for not using my local test environment correctly.

Edit: I do not know the process name, I need to discover the name (or pid) based on behavior.

© Super User or respective owner

Related posts about command-line

Related posts about apache