|go ahead... be a heretic|
Kill Processes on Pre-Forking Serversby aijin (Monk)
|on Oct 24, 2001 at 00:24 UTC||Need Help??|
aijin has asked for the
wisdom of the Perl Monks concerning the following question:
I've been working on a server based on the pre-forking server in recipe 17.12. I've come across a problem for which I'm having trouble seeing a solution.
The server is sent client requests through a web-browser. That part works perfectly. What I need to be able to do is send the server a client request to kill another process.
What's the problem? Well, if I allow a maximum of 5 processes to be forked at a time, and all 5 are busy processng requests, then the request to kill will be waiting in the queue and not killing the process immediately. If there was a guarantee that the processes would end quickly, this wouldn't be an issue, but the server handles requests that can take hours to complete. Waiting several hours for a kill request to be processed just isn't good enough.
I can't kill the process direct from the web-page, as I found out in another node.
I know I could just write another program owned by root which could kill the processes, but I, and The Guy Who Reviews My Code agree that it would not be the most elegant solution.
I, gentle monks, am stuck. I've been wracking my brain all day and I can not see a solution. Perhaps I am too close to the problem. I throw myself on the mercy of the Monastery. Help a fellow monk in need!