> They did not tell us about their application. But, Zope's database
> adapters work like this. They use the ZODB cache (and its pool) as an RDB
> connection pool. Thus, if the ZODB caches are not released, the RDB
> connections won't.
I believe you, but I'm not sure what to make of it; for example,
1. The OP is the only person who has this problem?
2. Other people have this problem too, and don't know what to do about
it either, but never complain?
3. Other people have had this problem, but do know what to do about it?
>> If not, you may have better luck on the zope-db list (which is
>> devoted to using other databases with Zope):
> The problem is not with the RDB but with the ZODB connections that are
> magically not garbage collected. He will probably not find help on
That suggestion was based on a guess that #3 (above) is most likely. Of
course I don't know, but #1 and #2 seem unlikely on the face of it. If
other people using RDB don't have this problem, then zope-db is the right
place to ask how they manage to avoid it.
> Some hints how to analyse garbage collection problems might help him.
Alas, the #1 cause for "garbage collection problems" is an application
keeping objects alive that the author thinks, or just assumes, "should be"
trash. IOW, there usually isn't a problem with garbage collection when one
is _suspected_, because the disputed objects are in fact not trash. If
that's what's going on here, mucking with ZODB might soften the symptoms but
without curing the underlying application problem. OTOH, if that's not
what's going on here, I'd expect to have heard about this here more than
once in the last 5 years ;-) Perhaps because the OP is unique in allowing
hundreds (or thousands -- whatever) of Connections to be active
simultaneously? Don't know.
I suggested before that forcing calls to gc.collect() would give more
evidence. If that doesn't help, then it's most likely that the application
is keeping Connections alive. Since I'm not familiar with the RDB code, I
suppose it's even possible that such code uses __del__ methods, and creates
cycles of its own, that prevent cyclic gc from reclaiming them. In that
case, there are serious problems in that code.
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org