<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 9, 2014 at 6:32 PM, Ben Tilly <span dir="ltr"><<a href="mailto:btilly@gmail.com" target="_blank">btilly@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The obvious thing to try is to use the alarm() function to send<br>
yourself a signal and set a signal handler that will just die to<br>
escape. But this is unlikely to work due to safe signals. Search for<br>
"Safe Signals" in perldoc perlipc for details. It will also show you<br>
how to use the POSIX module to set a signal handler that can work<br>
despite that.<br></blockquote><div><br></div><div>But where? Set storage_type and override/wrap the private method _connect or _populate_dbh? I'm wondering what's a good place to hook into.<br></div><div><br></div><div> </div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
On Thu, Oct 9, 2014 at 4:33 PM, Bill Moseley <<a href="mailto:moseley@hank.org">moseley@hank.org</a>> wrote:<br>
> Any suggestions how to set a connection timeout connections?<br>
><br>
> I'm using the Replicated storage. If there's a single slave configured and<br>
> it's not running (listening on a socket) DBIC will return quickly and fall<br>
> back to using the master.<br>
><br>
> But, if the slave is listening but not responding then DBIC will hang<br>
> waiting on a response. This can be demonstrated by using netcat to listen<br>
> to port and configure the slave to connect there.<br>
><br>
><br>
><br>
> --<br>
> Bill Moseley<br>
> <a href="mailto:moseley@hank.org">moseley@hank.org</a><br>
><br>
</div></div>> _______________________________________________<br>
> List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
> IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
> SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>
> Searchable Archive:<br>
> <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
<br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" target="_blank">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>
Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org" target="_blank">moseley@hank.org</a>
</div></div>