-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
When the remote peer hangs up, a stash of errors are reported (on the error level in the log) #118
Comments
I haven't had a chance to look into this, whether it occurs on other systems, etc. However, it is indeed the Dream convention that, by default, client-side errors are reported as warnings, while server-side errors are reported as errors. This might need special-casing on top of that, but for sure these shouldn't be ERRORs, at least. |
It looks like an unhandled ECONNRESET exception is being treated as a server-side error, which in a way, it is (an error within Dream itself, for not handling the exception more intelligently). I expect this occurs on all platforms. |
…to run cram tests; add a cram test for aantron#118; propose a small fix for aantron#118
Hi @aantron - I took a stab at a simple fix for this. #165 One other thing to note, I had to add https://github.com/dinosaure/paf-le-chien/pull/41/files to the |
A similar observation is |
I am able to reproduce this on macOS Monterrey 12.0.1, by running an HTTP load testing tool against dream, e.g.
Error:
This is on OCaml 4.13.1. On |
We are running Dream for https://builds.robur.coop on a FreeBSD 12.2 machine. This works smoothly, and the footprint looks much smaller than our previous opium-based server.
One downside of dream (we're using the latest release - see https://builds.robur.coop/job/builder-web-freebsd/build/4b2a96cd-c922-4ee9-a786-475f49878562/f/opam-switch for the full set of opam packages we're using) is that client connection errors are reported in the log:
This are logs reported via syslog to a syslog sink, that's why there are multiple headers.
Curious whether this only happens on FreeBSD, or on other systems as well when the client resets the connection before the HTTP request-response is done? It would be great to have an informational message about the connection reset, and keep the errors for actual server errors (at the moment, it is hard to derive anything from the number or errors reported via Logs, since a single connection reset (e.g. a port scanner or a TCP connection that is immediately reset) leads to 13 error message.
(On FreeBSD, you can use telnet/socat and tcpdrop to provoke a connection reset -- on Linux you may use tcpkill to reset the connection.)
The text was updated successfully, but these errors were encountered: