<div class="gmail_quote">On Mon, Aug 24, 2009 at 3:53 PM, Phil Christensen <span dir="ltr">&lt;<a href="mailto:phil@bubblehouse.org">phil@bubblehouse.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div style="word-wrap: break-word;"><div><div class="im"><div>On Aug 24, 2009, at 2:58 PM, Garret Heaton wrote:</div><blockquote type="cite">There is a solution to the reconnection issue posted <a href="http://www.gelens.org/2008/09/12/reinitializing-twisted-connectionpool/" target="_blank">here</a> which one of my friends improved upon. He wasn&#39;t on the list at the time of this posting so I&#39;m replying to this on his behalf. The improved solution is:<br>

 <pre><div></div></pre></blockquote></div>[snip]<div class="im"><br><blockquote type="cite"><pre><div>            <span># try the interaction again</span></div><div>            <span>return</span> <span>adbapi</span><span>.</span><span>ConnectionPool</span><span>.</span><span>_runInteraction</span><span>(</span><span>self</span><span>,</span> <span>interaction</span><span>,</span> <span>*</span><span>args</span><span>,</span> <span>**</span><span>kw</span><span>)</span></div>

</pre></blockquote></div></div><div>The thing that would concern me is that you can get a ConnectionLost error for a variety of different reasons, and they might not be raised by the first query issued in your interaction.</div>

</div></blockquote><div><br>Interesting, I&#39;ll have to look in to this a bit more.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div style="word-wrap: break-word;"><div></div><div>I feel like I can think of any number of ways running the same series of queries twice would be a bad thing. I have some very important queries that are run inside a interaction because they do a series of operations in sequence. I can&#39;t use transactions because my tables are MyISAM.</div>

<div><br></div><div>Perhaps I&#39;m jumping at shadows, but automatic re-querying just seems dangerous to me. Only the particular application knows when it&#39;s safe.</div></div></blockquote><div><br>This is very true, and I should have mentioned it in my reply. Re-running queries is only possible when you know your application can do it safely.<br>

<br>How would you solve the issue of a lost connection in your case?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;">

<div></div><font color="#888888"><div>-phil</div></font></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>