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
Connection error detected during read #959
Comments
We also noticed this in an application running on Heroku (the exception information was sent over to Sentry). We upgrade the application from Puma 2.16.0 to 3.4.0 today. Have only seen it once though, and I have no repro for it. If it continues to be a problem I will report back here.
|
We continue to see |
We also started seeing the same errors ("Puma::ConnectionError: Connection error detected during read") on Heroku when we upgraded to 3.4. The release notes say that version includes #894 to trigger the I assume this was happening quietly all along, and I think it's part of normal operation in that environment. If that's the case, I'd be interested in any advice on sorting the expected errors from the unexpected errors so that I can filter the noise out of our error notifications without potentially hiding real issues. I'd also be interested to hear if I'm totally wrong about this being "normal" in a Heroku legacy 1x dyno. |
This is mostly likely related to keep-alive connections. HAProxy is perhaps terminating the connection. The reason they're showing up now is a recent change to send errors that occur within the reactor to the lowelevel_handler. I'm going to make a change to that code to ignore any IO errors, so these should go away. |
@evanphx Ah, I thought I tried disabling keepalive in my HAproxy backend to work around this "issue", but I only disabled TCP keepalive, not HTTP keepalive mode. I added "option http-server-close" just for kicks; I'll let you know if Puma continues throwing this error even so. Thank you! |
Sure enough, no errors since making the HAproxy configuration change, so keepalives are definitely to blame here. |
@evanphx any plans in the near future on making a new release with the fix here? |
Just upgraded to
|
I've got a bit of a head-scratcher and could use some help gathering more diagnostic information. Every so often my Puma server will send this trace over to Rollbar (courtesy of
lowlevel_error_handler
):The funny thing is that these errors don't appear to be related to any requests. This Puma instance sits behind HAproxy and there are no requests in the Puma log or the HAproxy log that correspond to the times the errors occur. I added
pp env
to thelowlevel_error_handler
(side note: I can't sendenv
to Rollbar; it triggers a "can't modify frozen Array" error) and here's what it looks like:What's the best way to go about gathering some additional information to see what's happening here, and what Puma's trying to do when it happens? Thanks in advance.
The text was updated successfully, but these errors were encountered: