Author christian.heimes
Recipients Recursing, asvetlov, christian.heimes, yselivanov
Date 2020-05-22.10:17:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
When I run your example, RSS jumps from 20 MB to about 1,600 MB. There is almost no increase when I run the look several more times.

>>> p.memory_info()
pmem(rss=19902464, vms=240513024, shared=10014720, text=2125824, lib=0, data=9887744, dirty=0)
<stdin>:2: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
>>> p.memory_info()
pmem(rss=1608568832, vms=1829105664, shared=10014720, text=2125824, lib=0, data=1598480384, dirty=0)
>>> p.memory_info()
pmem(rss=1608835072, vms=1829367808, shared=10014720, text=2125824, lib=0, data=1598742528, dirty=0)
>>> p.memory_info()
pmem(rss=1608601600, vms=1829367808, shared=10014720, text=2125824, lib=0, data=1598742528, dirty=0)

Why are you creating so many SSLContext objects any way? It's very inefficient and really not necessary. I recommend that you create one context in your application and reuse for all connection. You only ever need additional contexts for different configuration (protocol, verification, trust anchors, ...).
Date User Action Args
2020-05-22 10:17:45christian.heimessetrecipients: + christian.heimes, asvetlov, yselivanov, Recursing
2020-05-22 10:17:45christian.heimessetmessageid: <>
2020-05-22 10:17:45christian.heimeslinkissue40727 messages
2020-05-22 10:17:45christian.heimescreate