Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.4
-
None
Description
Found a small memory leak on mariadb connection object.
import resource |
import mariadb as driver |
# import mysql.connector as driver
|
from time import sleep |
|
connection_parameters = { |
'host': '10.0.0.2', |
'user': 'me', |
'password': '123123', |
'database': 'test' |
}
|
|
while True: |
for i in range(200): |
db = driver.connect(**connection_parameters) |
db.close()
|
usage = resource.getrusage(resource.RUSAGE_SELF) |
print(f'Mem: {usage[2]}') |
sleep(1) |
Just in a few iterations the memory usage report grows if mariadb is used.