By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,381 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,381 IT Pros & Developers. It's quick & easy.

memory-leak in pysqlite 2.3.0 ?

P: n/a
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.

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)

----------------------------------

System in use:
Python 2.4.1, Sqlite3 3.3.6, Pysqlite 2.3.0

Regards,
Michael

Jun 19 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In <ma***************************************@python. org>, Michael Husmann
wrote:
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a
sqlite database increases memory consumption heavily. […]

Here a short example:
-------------------------------
#!/usr/bin/env python

import os
from pysqlite2 import dbapi2
print dbapi2.version

db = dbapi2.connect("bla.db")
c = db.cursor()

c.execute("create table b (c integer)")

for i in xrange(10000000):
c.execute("insert into b values (%d)" % i)


Just a guess: Commit the changes from time to time.

Ciao,
Marc 'BlackJack' Rintsch
Jun 19 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.