Memory issue #1726
Unanswered
KiKoS0
asked this question in
Potential Issue
Memory issue
#1726
Replies: 1 comment 9 replies
-
Any folks here want to start out by checking if you can reproduce the issue as described here? @KiKoS0 This looks like a pretty good start. If you're able to minimise the example you've linked so that it's even more slimline (keep taking things away until you can't anymore), and include it in a comment (rather than a linked repo) then we're more likely to be able to prioritise looking into this. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a FastAPI application that has an endpoint which gets the
og:image
meta tag of html pages, it uses ahttpx.AsyncClient
to stream the response and stop reading when it finds the tag. My issue is that after a dozen requests, the memory usage grows exponentially and the application crashes. I traced it down to find out that the problem is that I'm breaking out of reading the response when i find the tag:The memory leak stops when i comment the
break
, so i wanted to ask if this is expected to happen and that i should avoid doing that, or is this unexpected behavior?I recreated a minimal reproducible example so you can test it out.
I also found out that it only happens on specific websites that I'm currently dealing with. (so i included both normal and leaking links in the example)
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions