
From Python3.8 to Python3.10: Our Journey Through a Memory Leak
12/15/2025
This post details the debugging process for a memory leak in a Python service after upgrading from 3.8 to 3.10. It highlights the use of a custom tracemalloc-based memory profiler, the impact of gunicorn's preload setting on signal handling, and the root cause identified as an incompatibility between gevent and urllib3 (v1.26.16) leading to connection pool exhaustion. The solution involved downgrading urllib3 to v1.26.15.