Page 1 of 1

exit(): Takes forever to shutdown PHP Command-Line app

Posted: Tue Feb 23, 2010 3:43 pm
by jeff00seattle
I have put together a PHP Command-Line application and I am using exit(0) to shutdown application.

By the way, this command-line app is running on Windows 7.

When this app exits, it takes between 50-to-60 seconds for command prompt to return.

It is kind of embarrassing when demoing this app because it has the impression of hanging.

Is there any way that I can accelerate a PHP command-line app?

Thanks

Jeff in Seattle

Re: exit(): Takes forever to shutdown PHP Command-Line app

Posted: Tue Feb 23, 2010 5:43 pm
by pickle
How do you know it takes that long after exiting. More likely it's taking that long to execute.

Re: exit(): Takes forever to shutdown PHP Command-Line app

Posted: Tue Feb 23, 2010 5:46 pm
by jeff00seattle
I know I am at the end because I have an echo "Finished", then I stop-watch it.

However...
I did a php -m, and it also has a delay of 50-to-60 seconds, even after listing all the modules.

Re: exit(): Takes forever to shutdown PHP Command-Line app

Posted: Tue Feb 23, 2010 6:24 pm
by requinix
PHP 5.2? I have problems like that, but the delay is only a couple seconds.

I suspect it's an extension or three. Disable everything and see if that makes a difference.