Sobes.tech
Middle — Senior

Memory consumption growth issue in Python service after update

livecode

Task condition

The main Python service gradually increases its memory usage, eventually exhausting the server resources approximately within 48 hours. The automatic garbage collector cannot handle this situation. It has been observed that the problem arose after the last release, which included a custom library for caching requests to an external API.

It is necessary to describe the sequence of actions to be taken to identify the cause of the memory leak and its resolution.