in reply to Timeout Failing

And, generically speaking, "a timeout, in such a situation, can never be your friend," because you have absolutely no way to know what it is that the timer might be interrupting, at the precise moment that it occurs." Although the results will not be catastrophic to the database itself, since it's being managed by an external server, it could very easily leave the database in an unknown state. If something isn't finishing on time, there are no easy shortcuts: you have to find, and fix, the underlying bug in your program.

Replies are listed 'Best First'.
Re^2: Timeout Failing
by Your Mother (Archbishop) on Oct 25, 2017 at 04:51 UTC

    Never? Never is a very big word.

    If you're in a transaction, it doesn't matter what the timer interrupts and it will all be left in a predictable state. Tools like DBIx::Class with DBIx::Class::Storage::TxnScopeGuard and perhaps Sys::SigAction make things like what the OP requested semitrivial.

    Don't give generic, half-right advice; fixing the issue is indeed the best thing to do here. Give 100% on-point advice with working code or don't participate.