Not sure Hyper.get and Hyper.post are closing the connection
Hello,
I observed a leak on file descriptors with a software using Hyper. Looking at the code, the body function does not seem to issue a Message.close, nor does the Hyper.get or Hyper.post.
I am investigating more, but put the issue in case you can confirm.
Cheers, Christophe
I investigated more. Calling Message.close and/or using Hyper.request did not solve the problem. I think it is deeper in Dream and may be related to issue 347 of dream.
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 for the endorsement, I'm glad http-lwt-client is useful for you. It was quite some work to get a non-fd-leaking HTTP client (we iterated several times over the codebase to find and fix leaks).