To answer the question &quot;Does this problem exist in trunk?&quot;&nbsp; The answer is yes.<br><br>I just checked out the trunk and reran my program by sending it a test email ( which calls a sybase db ) <br><br>Here is the log output with the &lt;
twisted.enterprise.adbapi.ConnectionPool instance at 0xb7d230ac&gt; just to show i've got a adbapi connection:<br><br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] &lt;twisted.enterprise.adbapi.ConnectionPool
 instance at 0xb7d230ac&gt;<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] SELECT  convert(char(11), a.mail_date, 106)<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>
] FROM campaign a<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] WHERE <a href="http://a.id">a.id</a> = b.campaign_id<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>
] AND a.company_id = <a href="http://c.id">c.id</a> AND a.hash = 'PROTECTED'<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] adbapi connecting: Sybase {'passwd': 'protected', 'dsn': 'protected', 'auto_commit': 1, 'user': 'cmsc', 'delay_connect': 1}
<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] adbapi closing: Sybase<br>2006/12/08 16:21 -0700 [SMTP,0,<a href="http://127.0.0.1">127.0.0.1</a>] Connection lost.<br>2006/12/08 16:21 -0700 [-] Found an exception while processing, I'm just writing the message safely
<br>2006/12/08 16:21 -0700 [-] [Failure instance: Traceback: twisted.enterprise.adbapi.ConnectionLost:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/threading.py:422:run<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/python/threadpool.py:148:_worker
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/python/context.py:59:callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/python/context.py:37:callWithContext<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --- &lt;exception caught here&gt; ---
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/internet/threads.py:25:_putResultInDeferred<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py:379:_runInteraction<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py:64:rollback
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br><br><br>If this traceback fails to shake anyone's memory, I'll fill out a bug report and lend my time/machine as assistance.&nbsp; It's pretty strange how it works when I have the db connect code running as a standalone program but not when it's created via mktap .
<br><br>Occam's razor says &quot;run it as a standalone program&quot;!.&nbsp; Yes i'd have to agree.&nbsp; However, I would like it to work as a tapfile for simplicity in packaging and logging etc.<br><br>thanks for your help<br><br>
-rob<br><br><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>Sadly, I am totally unfamiliar with the sybase module and so I can't help you myself. &nbsp;However, if someone else using the sybase module were posting to this list, it would be good to know whether this issue also occurs with the most recent trunk checkout of Twisted SVN.
<br><br>If so, then at least it might be worthwhile to open a bug (with a minimal example attached) in the tracker. &nbsp;If not, then at least you could use a recent release of trunk to work around the issue.<br></div>
<br></blockquote></div>