[ZODB-Dev] Closing ZODB connection

Christian Robottom Reis kiko at async.com.br
Thu Oct 30 12:36:24 EST 2003


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.

> 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



More information about the ZODB-Dev mailing list