Maybe some more information would be useful here. We have a couple hundred old reporting CGI's. We have a bunch of users whom sometimes think they run too slow so either it the stop button on the browser, or they are the type to double click on buttons or links causing multiple copies to run.
The programs usually only take about 5 or 10 seconds to run, but sometimes as long as a minute. I wrote a Authz handler which basically makes sure they don't have more than x copies of the program already running. It does this via checking a configuration table in mysql which has a max per user setting for each uri path, then checking another table containing locks. Either the user is forbidden, or lock is written to the db and the handler returns OK. A cleanup handler is used to remove the locks from the database. When a user starts a program which takes a few seconds to run, and you hit the stop button, then start another, the user is denied, which is correct behavior. The problem is that the lock is never removed as the cleanup handler never executes. The PID of the process which creates a lock in the database is stored, and upon investigation the PID is never in the process list. So, this means what? I guess apache died before cleanup handler is run??? There is nothing in the error logs. Why would hitting the stop button cause apache to die without running the cleanup handler? Also, where in the docs are you talking about in your message below. I dug around but didn't find anything. A quick note about rough location or something to search for would be great. Thanks. On Fri, 2005-10-14 at 17:35 -0400, Perrin Harkins wrote: > On Fri, 2005-10-14 at 17:32 -0400, Richard F. Rebel wrote: > > I have been noticing that PerlCleanupHandlers are not called when a user > > pressed the STOP button in their browser before the page is downloded. > > Yes it is, but not until the request is actually completed. If you want > to stop your handler from trying to continue the request if the > connection has been cut, there is info in the docs on how to do that. > > - Perrin > -- Richard F. Rebel cat /dev/null > `tty`
signature.asc
Description: This is a digitally signed message part