| Issue 223: | memory leak in v2.1.11 when using charset utf8 | |
| 1 person starred this issue and may be notified of changes. | Back to list |
pyodbc v2.1.11
python 2.6.5 32-bit
windows 7
The following simple script leaks memory:
import pyodbc
import gc
import config
while True:
gc.collect()
conn = pyodbc.connect(config.connection_string, autocommit=True, charset="utf8")
conn.close()
Without charset="utf8" it doesn't leak.
Dec 18, 2011
Project Member
#1
mkleehammer
Status:
Investigating
Dec 18, 2011
(No comment was entered for this change.)
Status:
Complete
Feb 9, 2012
I am seeing this leak even without the utf8. Here is how I am monitoring memory while the above script is running in another window (Linux): [nz@NZ80851-H1 scripts]$ while [ true ]; do ps aux --sort -rss | grep python | grep -v "grep" | head -n 6; sleep 5; done nz 4149 53.6 0.2 171684 59000 pts/4 R+ 08:29 0:01 python ./test.py nz 4149 55.1 0.6 265704 152900 pts/4 S+ 08:29 0:04 python ./test.py nz 4149 55.5 1.0 360544 247804 pts/4 S+ 08:29 0:07 python ./test.py nz 4149 55.6 1.3 456800 344056 pts/4 R+ 08:29 0:10 python ./test.py nz 4149 55.8 1.7 553360 440656 pts/4 S+ 08:29 0:12 python ./test.py nz 4149 55.8 2.1 650544 537800 pts/4 S+ 08:29 0:15 python ./test.py nz 4149 55.9 2.5 743656 630972 pts/4 R+ 08:29 0:18 python ./test.py nz 4149 56.0 2.9 838016 725276 pts/4 S+ 08:29 0:21 python ./test.py nz 4149 56.1 3.3 932020 819276 pts/4 S+ 08:29 0:24 python ./test.py nz 4149 56.1 3.7 1027056 914312 pts/4 R+ 08:29 0:26 python ./test.py nz 4149 56.2 4.0 1123128 1010448 pts/4 S+ 08:29 0:29 python ./test.py nz 4149 56.2 4.4 1216160 1103544 pts/4 R+ 08:29 0:32 python ./test.py nz 4149 56.3 4.8 1308412 1195668 pts/4 R+ 08:29 0:35 python ./test.py nz 4149 56.3 5.2 1401420 1288740 pts/4 R+ 08:29 0:38 python ./test.py
Feb 9, 2012
I should also mention that I am not 3.0.2 yet, will try today. |