views:

279

answers:

1

If I'm using Apache with a pool of worker processes, and one of those launches its own long-running process, what happens to that worker? Will Apache kill it eventually, killing the child process? Will that worker be permanently unavailable, but keep running? How does it differ if it starts a thread instead of a process? How does it differ in various web app deployment scenarios?

+1  A: 

How is the long-running process launched? A cgi? If so the apache worker process will sit and wait for your process to finish, however long it takes, and the it will not serve any more requests. If you stop apache the worker process will be terminated. What happens to your process depends on what it does when it receives the TERM signal.

Martin Redmond
Sorry, should have clarified: the process is forked from the worker.
Brian