-----Original Message----- From: twisted-python-bounces@twistedmatrix.com [mailto:twisted-python- bounces@twistedmatrix.com] On Behalf Of exarkun@twistedmatrix.com Sent: Thursday, August 06, 2009 10:44 AM To: Twisted general discussion Subject: Re: [Twisted-Python] Adbapi issues
On 01:56 am, dave@krondo.com wrote:
Gerrat Rickert wrote: [snip]
2. ...since I can't get it to reconnect properly, perhaps I could just close the connections in the old connection pool, and create a new one...
dbpool = adbapi.ConnectionPool('cx_Oracle', conn_str, cp_noisy=True, cp_min=1, cp_reconnect=True, cp_max=3, cp_good_sql='select * from dual', threaded=True) dbpool.close()
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\python25\lib\site-packages\twisted\enterprise\adbapi.py", line 359, i n close if self.shutdownID: AttributeError: ConnectionPool instance has no attribute 'shutdownID'
...shouldn't shutdownID be initialized in the class, or at least in __init__ ?
Yes, probably so. Feel submit a ticket, including a patch if you want.
This looks a lot like a bug that's fixed in trunk already. I suggest trying this out with a recent checkout of trunk to see if it goes away before spending much time trying to track it down.
Jean-Paul
Well, before filing this as a bug, I found Ticket #2680, which I think is the same issue. Nothing's been fixed in the trunk though (...as of 30 seconds ago anyway). ...and judging from all the discussion on that ticket, maybe resolving this isn't as trivial as I would have expected. Gerrat