tags:

views:

706

answers:

2

I'm a PHP developer, but honestly my knowledge of server management is somewhat lacking. I fired off a script today that took a regrettably long time to run, and because it had an embedded call to ignore_user_abort(), pressing "stop" in the browser was obviously futile. There was a time limit of 15 minutes enforced in the FastCGI settings, but this was still incessantly long since I really had to just wait it out before I could continue with anything else. Is there some way to manage/kill whatever PHP scripts are being executed by FastCGI at any given moment? Thanks in advance.

+1  A: 

Does the php process appear in the taskmanager?
I wonder what happens if you kill it there. Will the IIS start another one to handle the next request?

VolkerK
Sometimes it will, but often it won't.
Robert Rouse
A: 

Restart IIS if its your own computer you're talking about. Execute this command from Windows Command Prompt, Windows CMD file or from the "Run" dialog box:

iisreset /restart

The Run dialog box and command prompt take ages to load if your PHP process is eating up all CPU cycles. So I'd recommend creating a CMD file and placing its shortcut in the Quick Launch bar for emergency.

Salman A
I was really asking more about killing one particular PHP process while not interrupting any other active PHP processes. Restarting IIS would just kill them all.
SoaperGEM