1) Use the alarm function to raise a signal after a number of seconds
eval { local $SIG{ALRM}=sub { die "ALARM\n" }; # \n is required alarm 300; # give it 5 minutes # your code here alarm 0; # reset alarm }; if ($@ eq "ALARM\n") { print "Timed out!\n"; }
2) Use Apache TimeOut directive
3) Use Time::Out, it looks cool and is well-documented.
Hope that helps,
SSF
In reply to Re: mod_perl2 | rabbitMQ | alarm
by sflitman
in thread mod_perl2 | rabbitMQ | alarm
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |