Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: mod_perl2 | rabbitMQ | alarm

by sflitman (Hermit)
on Mar 26, 2010 at 19:31 UTC ( #831247=note: print w/ replies, xml ) Need Help??


in reply to mod_perl2 | rabbitMQ | alarm

You could try

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


Comment on Re: mod_perl2 | rabbitMQ | alarm
Download Code
Re^2: mod_perl2 | rabbitMQ | alarm
by Anonymous Monk on Mar 26, 2010 at 20:29 UTC
    Hi,

    thanks for your reply. if I read the docs on threaded mpms and Time::Out correctly:

    1) is not possible

    2) I need to finish the request

    3) is based on alarm

    Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://831247]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (18)
As of 2014-07-23 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls