[pysqlite] memory-leak in pysqlite 2.3.0 ?
Gerhard Häring
gh at ghaering.de
Mon Jun 19 12:12:29 EDT 2006
Michael Husmann wrote:
>> Michael Husmann wrote:
>>> After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
>>> sqlite database increases memory consumption heavily. A similar program
>>> with Ruby and sqlite-ruby 1.1.0 does not affect memory consumption at
>>> all.
>>> [...]
>>> Python 2.4.1, Sqlite3 3.3.6, Pysqlite 2.3.0
>> You never COMMIT your changes here, that's probably what's causing
>> memory consumption on the SQLite side of things.
>> [...]
>
> I also tried that commit(). Memory consumption still grows permanently.
Thanks for the report. Upon debugging this a little, there's indeed a
bug which crept in in pysqlite 2.2.1 because of incorrect usage of the
weak references (*). This leads to the list of weak references per
connection to always grow and never shrink. I'll try to provide a fix
real soon.
-- Gerhard
(*) A missing PyWeakref_GetObject(), but I'll have to take a more
careful look.
More information about the Python-list
mailing list