-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process leaks when using async requests #375
Comments
Yes we need a better approach to the "transformer". Currently we |
Thanks for creating the issue! |
Actually, the transformer is spawned with a link to a process making the request. If I understand correctly, and you want to crash that process, then no I don't think users would prefer that 😉 I can imagine a scenario, where there is a GenServer responsible for polling some service(s) with a list of alternative URLs - if one fails, it tries another one. Crashing that process would be far from preferred. Looking at the code, here's what I would suggest:
I may be able to make a PR with the changes, but no ETA on that |
I have a PR #395 which would partially solve a related issue when the target process dies or is killed. For my use case this solves the problem of zombie processes. |
Whenever a request with
stream_to: pid
is made using HTTPosion atransformer
process is started (here). Unfortunately, it is possible that this process will stay alive forever.First case: when making a request to a nonexistent domain:
Second case: closing an async response (obtained using
async: :once
setting) manually:The last one I've found: when
:hackney
async response dies due to this bugThe text was updated successfully, but these errors were encountered: