We observed a memory leak in a code making the following call with a structlog logger in python:
logger.debug("RANGEB obs {}/{}".format(i + 1,obs_cnt), observation=observation)
Details:
- observation is a dictionary.
- the program works in a multi-threaded application.
It is very strange since the leak appears around every 600 calls and around 250kB were leaked.
It took us some time to hunt the memory leak and we got it with memory_profiler. Is this possible that we miss a configuration parameter of structlog that will prevent the memory leak ?