Friday, 10 March 2017

Diagnosing and Fixing Memory Leaks in Python | Fugue

Diagnosing and Fixing Memory Leaks in Python | Fugue: "In the fall, our metrics reported that a Python component of Fugue called the reflector was experiencing random restarts and instability after a few days of uptime. Looking at memory usage showed that the reflector's memory footprint increased monotonically and continuously, indicating a memory leak. tracemalloc, a powerful memory tracking tool in the Python standard library, made it possible to quickly diagnose and fix the leak. We discovered that the memory leak was related to our use of requests, a popular third-party Python HTTP library. Rewriting the component to use urllib from the Python standard library eliminated the memory leak. In this blog, we'll explore the details."



'via Blog this'

No comments:

Post a Comment