You might want to check out merlyn's web techniques columns for possible solutions to issues like this (long running scripts).
One in particular that may work for you is here: http://www.stonehenge.com/merlyn/WebTechniques/col20.html -> -----Original Message----- -> From: Huub Peters [mailto:[EMAIL PROTECTED]] -> Sent: Tuesday, April 09, 2002 2:03 PM -> To: [EMAIL PROTECTED] -> Subject: Create time-out in a cgi -> -> -> I've created a script that fetches and processes a lot of -> records from a -> database and feeds a 'real-time' status back to the browser (using -> autoflush) to display the current record. -> Sometimes, for (yet) unknown reasons, the script hangs. -> It's hard to find -> the actual cause because it happens rarely and randomly and -> it's not the -> main issue now. -> Just restarting the script makes it continue where it left -> of so that's no -> problem but the connection to the database isn't closed -> properly and the -> script has to finish fully automated without any user-interaction. -> (monkey-proof) -> -> To rule out any 'hangs' caused by internet-connection -> problems between the -> client (browser) and the server I want to create a time-out -> in the script. -> The idea is to start a timer and reset it after every -> succesfull fetch. If -> the -> script hangs again the timer reaches a certain value, -> properly closes the -> connection to the database and restarts the script 'till -> all processing is -> done. -> I've found a few modules regarding timers but I can't find -> any solution or a -> way to make this happen. -> -> All pointers, suggestions are greatly appreciated! -> -> Regards, -> Huub Peters. -> ------------------------------------------------------------ -> ---------------- -> Trendesign MultiMedia Webdesign -> The Netherlands -> [EMAIL PROTECTED] -> http://www.trendesign.nl -> -> -> _______________________________________________ -> Perl-Win32-Web mailing list -> [EMAIL PROTECTED] -> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs -> _______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs