> On Fri, 2003-12-05 at 15:09, Jim Morrison [Mailing-Lists] wrote: > > I have a piece of one of my mod_perl apps that potentially takes quite a > > while to complete. What I would like to do is to get Apache/mod_perl to > > start a second process which would do the work, return a page to the > > user, and get on with the next thing..
When I run into something like this, I usually end up using a database as a buffer. You know, the initializing perl CGI creates a row in the database iwth enough information to start the operation, and then returns a 'success' message. It seems a bit heavyweight at first, but it gives you lots of reporting flexibility. There was a daemon that would wake up every so often and ping the database to see if there were any new rows to process. As it would process them it would update the database. To check on the status, I had another CGI that could query the database to see progress and return it in a web page. -Ken -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html