<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">&lt;<a href="mailto:btilly@gmail.com" target="_blank">btilly@gmail.com</a>&gt;</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>
&quot;Safe Signals&quot; 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&#39;m wondering what&#39;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 &lt;<a href="mailto:moseley@hank.org">moseley@hank.org</a>&gt; wrote:<br>
&gt; Any suggestions how to set a connection timeout connections?<br>
&gt;<br>
&gt; I&#39;m using the Replicated storage.   If there&#39;s a single slave configured and<br>
&gt; it&#39;s not running (listening on a socket) DBIC will return quickly and fall<br>
&gt; back to using the master.<br>
&gt;<br>
&gt; But, if the slave is listening but not responding then DBIC will hang<br>
&gt; waiting on a response.   This can be demonstrated by using netcat to listen<br>
&gt; to port and configure the slave to connect there.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Bill Moseley<br>
&gt; <a href="mailto:moseley@hank.org">moseley@hank.org</a><br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; 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>
&gt; IRC: <a href="http://irc.perl.org#dbix-class" target="_blank">irc.perl.org#dbix-class</a><br>
&gt; 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>
&gt; Searchable Archive:<br>
&gt; <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>