[Twisted-Python] delay_connect problems in twisted.enterprise.adbapi

Rob Hoadley hoadley at gmail.com
Fri Dec 8 16:41:23 MST 2006


To answer the question "Does this problem exist in trunk?"  The answer is
yes.

I just checked out the trunk and reran my program by sending it a test email
( which calls a sybase db )

Here is the log output with the
<twisted.enterprise.adbapi.ConnectionPoolinstance at 0xb7d230ac> just
to show i've got a adbapi connection:

2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] <
twisted.enterprise.adbapi.ConnectionPool instance at 0xb7d230ac>
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] SELECT convert(char(11),
a.mail_date, 106)
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] FROM campaign a
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] WHERE a.id = b.campaign_id
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] AND a.company_id = c.id AND
a.hash= 'PROTECTED'
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] adbapi connecting: Sybase
{'passwd': 'protected', 'dsn': 'protected', 'auto_commit': 1, 'user':
'cmsc', 'delay_connect': 1}
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] adbapi closing: Sybase
2006/12/08 16:21 -0700 [SMTP,0,127.0.0.1] Connection lost.
2006/12/08 16:21 -0700 [-] Found an exception while processing, I'm just
writing the message safely
2006/12/08 16:21 -0700 [-] [Failure instance: Traceback:
twisted.enterprise.adbapi.ConnectionLost:
        /usr/lib/python2.4/threading.py:422:run

/usr/lib/python2.4/site-packages/twisted/python/threadpool.py:148:_worker

/usr/lib/python2.4/site-packages/twisted/python/context.py:59:callWithContext

/usr/lib/python2.4/site-packages/twisted/python/context.py:37:callWithContext
        --- <exception caught here> ---

/usr/lib/python2.4/site-packages/twisted/internet/threads.py:25:_putResultInDeferred

/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py:379:_runInteraction

/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py:64:rollback
        ]


If this traceback fails to shake anyone's memory, I'll fill out a bug report
and lend my time/machine as assistance.  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 .

Occam's razor says "run it as a standalone program"!.  Yes i'd have to
agree.  However, I would like it to work as a tapfile for simplicity in
packaging and logging etc.

thanks for your help

-rob


Sadly, I am totally unfamiliar with the sybase module and so I can't help
> you myself.  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.
>
> If so, then at least it might be worthwhile to open a bug (with a minimal
> example attached) in the tracker.  If not, then at least you could use a
> recent release of trunk to work around the issue.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20061208/810bc21f/attachment.html>


More information about the Twisted-Python mailing list