0

We have a CentOS server that runs our PHP scripts.

Sometimes when we start a script from a browser and the browser is closed the job keeps running on the server.

Is there a way to kill that particular job ?

On the server I can see a bunch of /usr/sbin/httpd jobs running, but how do I know that is the job that was started in the browser, so I make sure I'm not killing some other job ?

PhDJ
  • 173
  • 1
  • 4
  • 15

1 Answers1

1

It would be useful if you provided details of the particular jobs that are being started by the users.

Its difficult to know which thread the script is running on, It would probably be more effective to set your max_execution_time in your php.ini file to something suitable.

If you are getting zombie processes, you could try something like the solution to this other question on SO:

bash script to kill php process older then an hour

There are other options available depending on what the scripts are doing, but it's difficult to say without knowing what it's doing

Community
  • 1
  • 1
Scriptable
  • 19,402
  • 5
  • 56
  • 72