-
Notifications
You must be signed in to change notification settings - Fork 7
[HACKTOBERFEST2021] [PYTHON] Memory Leak #32
Comments
After first analysis the results concluded 3 test methods that were not cleaning up properly: A few more tests would have increased RAM each run, a more detailed log will be added after a long test run. Interesting is how two tests constantly reduced their used RAM: |
@J-Jimmy After this analysis I assume that the problem is a problem in the "Temates". These may inherit from another template and may not clean up correctly after printing. |
Out of 2068 tests, these are the results:
Where the % is the amount of test runs with no increased RAM.
To verify my results, I will run each test 100 and 1000 times and measure the RAM before and after again, this test won't be checked in, it's just to verify that a single run of those tests can work to determine leaks Further tests narrowed it down to the png convert:
However if the service is started normaly and pdf is requests the RAM still increases constantly. |
Actually i got it workaround/fixed. We will have to discuss this solution tomorrow, but I think it's practicable ^^ |
@J-Jimmy You should now have write access |
I did the boring fix too.... |
So seems after running the container 2 days the RAM still increased by a 1.6GiB in memory. I will change my PR to the docker-container RAM limit which will force python to free memory and keep it low. |
Type of report:
Actual behavior:
If you use the service for a longer time, the RAM consumption increases significantly. This should not be the case.
I assume that somewhere files/streams are not closed properly and therefore they remain infinitely long in RAM
The text was updated successfully, but these errors were encountered: