I had been reading about Apache graceful restart.
apachectl -k graceful
The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they're not serving anything).
...meaning that anyone who is in the middle of downloading something will continue to be able to download it.
If a long running PHP script is currently being executed (eg: processing a large image), will graceful restart allow it to be completed or will it hinder its execution?
I'd presume if you have php as an apache module you'd be ok, however if you have php as CGI you might interrupt it. If I ever have any heavy image processing, I tend to prefer imagemagick as the method of carrying it out as apart from being more advanced, it then exists outside php/apache limitations.
thanks for the reply
I'm using imagemagick.
If you find out more about this, please post
Since it is Apache which is handling requests (Apache asks PHP for help when required but receives the output from PHP to send back to the requester), I'd GUESS that forcing a restart will terminate any and all ongoing processes. That said, the short time that Apache takes to restart (assuming no adverse impace from the changes you made to its configuration files which are requiring the restart are syntactically valid), any disruption in service should be minimal (even on a busy server).
This topic is now closed. New replies are no longer allowed.