On Nov 11, 2003, at 4:42 AM, Frank Barknecht wrote:
> I added something like:
>
> print "self._pool: %s " % len(self._pool)
>
> to DBConnection's getConnection and releaseConnection methods. This
> count seems to only go up constantly:
> ...
> self._pool in get: 12
> self._pool in release: 13
> self._pool in get: 12
> self._pool in release: 13
> self._pool in release: 14
> ...
>
> Is this expected behaviour?
Huh, that's odd. makeConnection is definitely only supposed to be run
if the pool is empty. And the code sure looks like that's what it
does. I just don't know why that would possibly happen...
Could it just be that you are slowly creeping up the number of
concurrent connections? E.g., you've made 15 concurrent connections,
12 of them have been released, and the increase in numbers are the
other 3 slowly returning? It certainly seems possible that connections
could get completely lost somewhere, or only slowly return as iterators
are garbage collected. But that shouldn't cause the actual pool to
grow unduly.
What happens if you also add a print to makeConnection?
--
Ian Bicking | ia...@co... | http://blog.ianbicking.org
|