[CONPY-119] Memory leak Created: 2020-10-02  Updated: 2020-10-03  Resolved: 2020-10-03

Status: Closed
Project: MariaDB Connector/Python
Component/s: DBAPI 2.0
Affects Version/s: 1.0.2
Fix Version/s: 1.0.3

Type: Bug Priority: Blocker
Reporter: Stefko Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None
Environment:

Python 3.7.4/Windows 7


Attachments: Text File leak_test_short.py    

 Description   

With a reference to my previous report of memory leak (CONPY-118):
The memory leak appears to has been fixed when testing with the script provided in the issue report. Thank you very much for the quick fix !

I've been running the script for 10 minutes on my PC and the memory usage reported by the Windows Task Manager started from 6336K to reach stable level of 6492K. This test was run after a slight modification of the test script, namely: added gc.collect() at every 100th iteration.

Then I modified the script thus:
replaced
cursor = conn.cursor(dictionary=False)
with
cursor = conn.cursor(dictionary=True)

Still gc.collect() every 100th iteration.

Running this modified script for 10 minutes showed memory usage increase from initial 6348K to 7064K.
IMHO this indicates some outstanding allocations related to the result type as dictionary.
Modified script is attached.



 Comments   
Comment by Georg Richter [ 2020-10-03 ]

Fixed in rev. 846c0d0fdb3bc28d3d7cfb4b43915811e1603a00

Generated at Thu Feb 08 03:30:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.