[ZODB-Dev] Closing ZODB connection

Antonio Beamud Montero antonio.beamud at linkend.com
Thu Oct 30 13:00:10 EST 2003


El jue, 30-10-2003 a las 18:36, Christian Robottom Reis escribió:
> On Thu, Oct 30, 2003 at 06:22:13PM +0100, Antonio Beamud Montero wrote:
> > It seems the connections aren't closed and when it reaches the max.
> > number of connections the server stop working.
> 
> To be honest, I have a similar problem here. I just worked around it by
> incrementing max_connections when I hit the server limit. I ended up
> investing my time in other, more fruitful ventures.

Ops, I need a solution to put the server in production in the next
days... 
I have used the onCloseCallback() method to see if the close method has
any efect, and the callback registered is executed... What more I need
to do...?


> > I have re-read the ZODB-ZEO documentation over 10 times and nothing... 
> > My only question is why this code works?:
> > 
> >  def get_pending_requests(self):
> >         con = self.db.open()
> >         root = con.root()
> >         lista = root['pendientes'].get_resumed_list()
> >         con.close()
> >         return lista
> >         
> > If the lista is a reference to a persistent list, why it works if I have
> > closed the connection?
> 
> It's a long story, but it's probably because it's been unpersisted, and
> it may work if it only holds references to basic types. If it holds
> references to persistent objects that haven't been unpersisted, it will
> explode when trying to access their state.
> 
> Take care,
> --
> Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
-- 
Antonio Beamud Montero <antonio.beamud at linkend.com>




More information about the ZODB-Dev mailing list