[egenix-users] Time out problem if you database server goes offline
peter.millar at parasyn.com.au
Thu Oct 28 16:20:19 CEST 2004
I am using windows mxODBCZopeDA 1.0.8.
It has been working perfectly.
I am running zope with a manually added mxodbc connection.
I have a product that uses this connection.
Today our database server died.
The status page of the database adaptor showed that the connection was
closed, even though I didn't close it.
I decided to put some error checking in around my code using the
connection, so that I don't query the db if the connection is dead.
My code looks like this:
#self.dbConnectionId = mxODBCZopeDA connection id
dbConnection = getattr(self, self.dbConnectionId)
print 'am I there yet'
if dbConnection.connected() == 0:
results = 'DB CONNECTION IS CLOSED'
=== END OF CODE ===
The first print statement prints instantly.
The problem I have is that it takes forever to print 'DB CONNECTION IS
CLOSED' I am talking like 5 minutes. WHY??
I don't have the connect on demand setting set.
Is there some internal setting where if the connection is stuffed it
will retry until it gets bored??
Alternatively ... Once we got the machine working, I stopped the
connection myself and my code returns instantly.
So there appears to be a problem here!!!
More information about the egenix-users