[egenix-users] Error Msg: 'NoneType' object is not callable"
in <bound method mxODBC_Connection.__del__ of
mal at egenix.com
Mon Feb 9 23:13:16 CET 2009
On 2009-02-09 16:20, Senthil Kumaran wrote:
> On Mon, Feb 9, 2009 at 8:23 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>> Are you using multiple threads or a single threaded process and
>> sharing the session object between those ?
>> Do you see any other messages related to this in the client or
>> server log files ?
> Thanks for quick response.
> I am using a single threaded process and sharing the session object
> between the processes.
> I see the following in the Server log files when that error occurs:
> Time Stamp: <SessionThread id="some number">: Protocol error: lost connection
> And another information worth mentioning here would be, even though
> mine is a single process, after a n number of COMPLETED
> tests/execution of the snippet, I get:
> InterfaceError: Connection limit exceeded. Your license allows 20
> physical database connections.
> At that point, I go to the Server and restart the Connect Server to
> proceed with my client code implementation/testing again.
> What is actually happening here? Why is the Connection limit error
> message coming for script executions one after the other?
See my other reply. The above cases are also side-effects of
using a module global for storing the session objects or
If you don't close the connections you are using explicitly
they may well still be kept alive by some reference to the
connection object in your application.
The server will only
shutdown the real connection to the database if it sees
a .close() method call from the client side (or finds a
While you can rely on the fact that the conneection
object deallocation will implicitly close the connection,
you do have to be careful about how you manage references
to the connection object. Otherwise, the connections are
not closed when you think they should be closed.
"Explicit is better than implicit" :-)
Professional Python Services directly from the Source (#1, Feb 09 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the egenix-users