-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Dream leaks sockets on macOS #347
Comments
Thank you! This appears to be a very serious bug. For confirmation, could you try with |
Yes, I have those locally and they also seem to be installed on the CI machine.
The stack trace seems to indicate that Output from
|
I think I have the same issue on a raspberry pi. I was using hyper, tried to close the message in Hyper.get / Hyper.post doest not solve the problem. Are you letting the GC close the socket ? This is unsafe, no warranty that the GC (especially the major GC) will collect socket fast enough ? I ask this, because socket are not freed immediatly after Hyper.get and Hyper.close exit. So my guess was socket closed by a finaliser in the GC. |
I copy the message I dit on hyper: I investigated more. Calling Message.close and/or using Hyper.request did not solve the problem. The observed behavior is that in general 5-10 unused sockets are preserved for some unknown reasons, but after a few days, this increase to more that 1000 sockets and the program fails with EMFILES as expected. Switching to http-lwt-client immediatly solved the issue, so it must be an issue related to Hyper/Dream. Now no unused socket is kept. Now that I have switched my code in production to http-lwt-client, I will not be able to investigate more. Sorry. |
Thanks. I am still working on this, but greatly slowed down by that I haven't been able to observe it locally -- so far only in GHA. |
Anton Bachin ***@***.***> writes:
Thanks. I am still working on this, but greatly slowed down by that I haven't been able to observe it locally -- so far only in GHA.
Try to just do a small client doing request in a loop, using
Hyper.get. You will observe that some sockets remain open. The behavior
is strange, and really looks like socket closed by a GC finaliser: there
are two many sockets open, but not one per request.
Cheers,
Christophe
… —
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
--
Christophe Raffalli
web: https://raffalli.eu
|
On macOS a simple Dream server,
leaks sockets (does not close them properly) and crashes after about 1k requests:
See here for a full project that reproduces the issue with GitHub actions.
The text was updated successfully, but these errors were encountered: