Hello from a new list member!&nbsp; I'm evaluating Twisted for use in my company's product, and I'm currently stuck on a problem that I don't know how to debug.<br><br>I am creating an XMLRPC server that uses twisted.enterprise.adbapi

 to query a database.&nbsp; The symptom I've seeing is that the *third* call to an xmlrpc method that queries the database delays for some time (a minute or so) before returning with the correct results.&nbsp; The first two calls always return very quickly.&nbsp; Calls after the third one usually return quickly as well.
<br><br>I've narrowed down the code as far as I can, and I'm not sure what to check next.&nbsp; Any help would be appreciated.&nbsp; Here's what I've found so far (complete code is at the bottom of the email):<br><br>1) Not using the XMLRPC server, just using 
reactor.callLater() to run the query, then calling callLater again in the callback results in the query getting run over and over and I never see a delay.&nbsp; So I suspected the XMLRPC server code.<br><br>2) Calling XMLRPC methods that don't use the dbpool always return quickly.&nbsp; So I suspected the adbapi code.
<br><br>3) Changing the cp_min argument to ConnectionPool's constructor can change the behavior - making it larger than 3 results in the third call being delayed, then the fourth call getting error 8002 back from the server. 
<br><br>4) I've tried adodbapi as well as the eval version of mxODBC just to make sure it wasn't the db driver - the behavior is identical in both cases.<br><br>Any ideas?&nbsp; Thanks in advance,<br>Sean<br><br>---<br>from twisted.internet
 import reactor<br>from twisted.web import xmlrpc
<br>from twisted.enterprise import adbapi <br>&nbsp;&nbsp;&nbsp; <br>class ReportRunner(xmlrpc.XMLRPC):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def __init__(self):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.dbpool = adbapi.ConnectionPool(&quot;mx.ODBC.Windows&quot;, &quot;dsn&quot;,&quot;user&quot;,&quot;pwd&quot;)<br><br>&nbsp;&nbsp;&nbsp; def xmlrpc_test(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return self.dbpool.runQuery(&quot;select 1&quot;)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def xmlrpc_quit(self):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reactor.callLater(1, reactor.stop)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &quot;OK&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>def main():&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; from twisted.web import server<br>&nbsp;&nbsp;&nbsp; r = ReportRunner()
<br>
&nbsp;&nbsp;&nbsp; reactor.listenTCP(7080, server.Site(r))<br>&nbsp;&nbsp;&nbsp; reactor.run()<br><br><br>if __name__ == '__main__':<br>&nbsp;&nbsp;&nbsp; main()<br><br><br><br><br>