Menu

#314 MySQLdb: (1, 2, 3, 'final', 0) - Memory leak ?

open
MySQLdb (285)
5
2014-08-23
2011-08-01
Hetii
No

python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) -> VRIT: 34620 RES: 5008
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import MySQLdb
conn = MySQLdb.connect(db = '...', host = '...', user = '...', passwd = '...', charset = 'utf8', use_unicode = '0')
conn.ping(True)
cu = conn.cursor() -> VRIT: 656688 RES:7792
sql = "..."
cu.execute(sql) #Now i execute the same query few times:
521039L
cu.execute(sql)
521039L
cu.execute(sql)
521039L
cu.execute(sql)
521039L
cu.execute(sql)
521039L

  1. cu.execute(sql) ---> VIRT: 360MB RES:304M
  2. cu.execute(sql) ---> VIRT: 713MB RES:656M
  3. cu.execute(sql) ---> VIRT: 713MB RES:656M
  4. cu.execute(sql) ---> VIRT: 717MB RES:660M
  5. cu.execute(sql) ---> VIRT: 717MB RES:661M

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.