Skip to content
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

fatal: ::read(fd, buffer, maxBytes): Connection reset by peer #164

Closed
ohwgiles opened this issue Dec 11, 2021 · 3 comments
Closed

fatal: ::read(fd, buffer, maxBytes): Connection reset by peer #164

ohwgiles opened this issue Dec 11, 2021 · 3 comments

Comments

@ohwgiles
Copy link
Owner

Beginning a new issue for the problem reported by @jbglaw and discussed at #146 after the issue was initially closed.

Under some circumstances, Laminar may catch a fatal exception and exit with this output: fatal: ::read(fd, buffer, maxBytes): Connection reset by peer.

The original error causing the exception comes from here, when read returns -1 with errno == ECONNRESET.

In 0281030 I made the error non-fatal, but then the http server stops accepting new connections.

@ohwgiles
Copy link
Owner Author

The underlying behavior of the kj library is being investigated here.

In the meantime, this issue can be addressed in laminar by catching this exception and restarting the http server.

ohwgiles added a commit that referenced this issue Dec 24, 2021
Originally reverted to prevent a crash when reading from an http
client raised ECONNRESET. Although this prevented a crash, laminar
stopped listening for http connections. That issue was resolved in
37bbf6a (see #164), so make all exceptions fatal again.

This reverts commit 0281030.
@maralorn
Copy link

Hey @ohwgiles, thank you for this fix! I have continuous problems with this issue for quite a while.

Do you maybe plan to do a bug fix release soon? That would be awesome!

I maintain laminar in nixos and observe about on laminar crash per day on my personal server. So I would prefer to not expose our users to this problem for much longer. If you tell me that it will be a while until the next release, I will consider applying some patches downstream.

@ohwgiles
Copy link
Owner Author

Thanks for maintaining the nixos package! I intend to have a release out within a week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants