Re: alarms
Damyan Ivanov wrote: On Thu, Apr 11, 2002 at 12:30:53AM +0800 Stas Bekman wrote: mire wrote: I wish to know 2 things about mod_perl 1) what happens when you set an alarm for lets say 30 seconds and the request finishes in 20 ? Since apache child is very likely still alive is mod_perl too ? You don't set alarm around the request, do you? You set the alarm for a certain code snippet and you reset it to 0 when it's done before the alarm went off. For runaway process control, see Apache::Watchdog::RunAway OK, but I am really curious. What really happens if I intentionally set the alarm to ring after the request has finished? For example if I want something to hapen if apache child is idle for more than 15 minutes. Though I've never tried doing this, I suppose this will just work, unless something disables/overrides your alarm sighandler. SIGALRM is a normal process level SIG after all. Think of a mod_perl process as a process that doesn't quit but just hangs there in a sort of while loop, waiting for something to crunch on. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
alarms
I wish to know 2 things about mod_perl 1) what happens when you set an alarm for lets say 30 seconds and the request finishes in 20 ? Since apache child is very likely still alive is mod_perl too ? 2) does apache child die when you issue die; from perl code (mod_perl ofcourse) ? -- Best regards, Miroslav Madzarevic, Senior Perl Programmer [EMAIL PROTECTED] Mod Perl Development http://www.modperldev.com Telephone: +381 64 1193 501 jamph $_=,,.,,.,,,.,,,.,,,..,,.,,,.,.,,,; s/\s//gs;tr/,./05/;my(@a,$o,$i)=split//;$_=DATA;tr/~`'^/0-4/;map{$o .=$a[$i]+$_;$i++}split//;@a=$o=~m!...!g;map{print chr}@a; __DATA__ `~^`~~``^`~`~`^``~`~``''~^'`~^``'``^```~^``'```'~`~
Re: alarms
mire wrote: 1) what happens when you set an alarm for lets say 30 seconds and the request finishes in 20 ? You are supposed to unset the alarm if the event you were timing finishes before it goes off. 2) does apache child die when you issue die; from perl code (mod_perl ofcourse) ? No, only when you call exit or child_terminate(). - Perrin
Re: alarms
mire wrote: I wish to know 2 things about mod_perl 1) what happens when you set an alarm for lets say 30 seconds and the request finishes in 20 ? Since apache child is very likely still alive is mod_perl too ? You don't set alarm around the request, do you? You set the alarm for a certain code snippet and you reset it to 0 when it's done before the alarm went off. For runaway process control, see Apache::Watchdog::RunAway 2) does apache child die when you issue die; from perl code (mod_perl ofcourse) ? It does not, see: http://perl.apache.org/preview/modperl-docs/dst_html/docs/1.0/guide/porting.html#die___and_mod_perl __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: alarms
On Thu, Apr 11, 2002 at 12:30:53AM +0800 Stas Bekman wrote: mire wrote: I wish to know 2 things about mod_perl 1) what happens when you set an alarm for lets say 30 seconds and the request finishes in 20 ? Since apache child is very likely still alive is mod_perl too ? You don't set alarm around the request, do you? You set the alarm for a certain code snippet and you reset it to 0 when it's done before the alarm went off. For runaway process control, see Apache::Watchdog::RunAway OK, but I am really curious. What really happens if I intentionally set the alarm to ring after the request has finished? For example if I want something to hapen if apache child is idle for more than 15 minutes. -- Damyan
Alarms?
Hello! I'm getting lots of errors in log: [Thu Jan 10 18:54:33 2002] [notice] child pid 8532 exit signal Alarm clock (14) [Thu Jan 10 18:54:37 2002] [notice] child pid 8542 exit signal Alarm clock (14) [Thu Jan 10 18:54:42 2002] [notice] child pid 8537 exit signal Alarm clock (14) What causes that alarm? What does that alarm mean (I'm asking NOT about signal itself, but about purpose)? How can I prevent that alarm from killing running processes in the middle of processing? I've set up $sig{ALRM} in handler.pl, but it does not get called. Alex.
Re: Alarms?
At 06:56 PM 01/10/02 +0300, [EMAIL PROTECTED] wrote: Hello! I'm getting lots of errors in log: [Thu Jan 10 18:54:33 2002] [notice] child pid 8532 exit signal Alarm clock (14) I hope I remember this correctly: What's happening is you are setting a SIGALRM handler in perl, but perl is not correctly restoring Apache's handler when yours goes out of scope. So then a non-mod_perl request times out there's not handler and the process is killed. Check: http://thingy.kcilink.com/modperlguide/debug/Debugging_Signal_Handlers_SIG_.html http://thingy.kcilink.com/modperlguide/debug/Handling_Server_Timeout_Cases_an.html -- Bill Moseley mailto:[EMAIL PROTECTED]