Memory doesn't free after cursor close
Bug #812970 reported by
Creotiv
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Connector/Python |
Triaged
|
Critical
|
Geert JM Vanderkelen |
Bug Description
Python version: Python 2.6.6
MySQL Connector/Python version (and/or revision): python -c "import mysql.connector as db; print db.__version__"
MySQL version: 5.1.49-
Platform: Linux 2.6.38-
I think cursor object doesn't free memory on closing.
I use gevent + myconnpy + dbutils(pooling). I create about 100 connections to db on application init, and starting backup some user information from DB server, but after backup is finished there app doesn't free memory.
Do you free memory on cursor closing? Or only on connection close?
Changed in myconnpy: | |
importance: | High → Critical |
Changed in myconnpy: | |
assignee: | nobody → Geert JM Vanderkelen (geertjmvdk) |
status: | Confirmed → In Progress |
To post a comment you must log in.
Here http:// bazaar. launchpad. net/~geertjmvdk /myconnpy/ main/view/ head:/python2/ mysql/connector /cursor. py
you add __del__ method for Cursor object, thats mean that all objects attributes you must delete manually due to GC working bad with objects that have __del__ methods ovveriden. On close method you don't delete self._results. I think this may cause bug with memory.
I will try to test this, and answer here tomorrow.