worldveil/dejavu

out of memory when use mysql

haha010508 opened this issue · 3 comments

I installed the mysql server in my Docker image and recorded about 200 songs. After many queries, the mysql server crashed due to out of memory. Has anyone encountered this problem? Is there a problem with mysql server or mysql-connector-python?

Now, I'm sure mysql-connector-Python is causing a memory leak. If I keep running recognize_files (there are multiple audio files), the Memory of Python processes keeps getting higher and higher until out of memory, can someone to fix this problem? Or do I need a different database?

Two simple questions. Why do you need to use a database? Also why do need to use a docker image?

I've stated before look into the fingerprint.py script, in fact the script is a bit rubbish to encoding, instead of using the hash as a integer it uses string which will use a lot more memory in a database (or whatever structure you may use).

This is my fault, i open plot and forget to close, so everytime 10M memery is lost.