[issue40727] SSLContext.load_verify_locations leaks memory on Linux in async code
Recursing
report at bugs.python.org
Fri May 22 06:32:24 EDT 2020
Recursing <buonanno.lorenzo at gmail.com> added the comment:
> Without asyncio memory consumption stays low and stable for me
Same for me
> RSS jumps from 20 MB to about 1,600 MB.
That is the memory consumption I observe as well, the issue is that it doesn't get freed on Linux
> There is almost no increase when I run the look several more times.
Same for me, but of course only if I exit the "async" context between runs
> Why are you creating so many SSLContext objects any way? It's very inefficient and really not necessary.
The original issue was observed in a very long running process (months), that occasionally needed a context and it was convenient to just create one every time (actually it creates an AsyncClient context https://github.com/encode/httpx/issues/978) even if it is relatively inefficient, it didn't really matter, but memory usage unexpectedly slowly grew to 1 GB which was very unexpected
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40727>
_______________________________________
More information about the Python-bugs-list
mailing list