[Dbix-class] Connection timeouts?

Ben Tilly btilly at gmail.com
Fri Oct 10 01:32:13 GMT 2014


The obvious thing to try is to use the alarm() function to send
yourself a signal and set a signal handler that will just die to
escape.  But this is unlikely to work due to safe signals.  Search for
"Safe Signals" in perldoc perlipc for details.  It will also show you
how to use the POSIX module to set a signal handler that can work
despite that.

On Thu, Oct 9, 2014 at 4:33 PM, Bill Moseley <moseley at hank.org> wrote:
> Any suggestions how to set a connection timeout connections?
>
> I'm using the Replicated storage.   If there's a single slave configured and
> it's not running (listening on a socket) DBIC will return quickly and fall
> back to using the master.
>
> But, if the slave is listening but not responding then DBIC will hang
> waiting on a response.   This can be demonstrated by using netcat to listen
> to port and configure the slave to connect there.
>
>
>
> --
> Bill Moseley
> moseley at hank.org
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



More information about the DBIx-Class mailing list