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

Ignore Errno::EPIPE error causes when reading body (Puma) #1294

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

tombruijn
Copy link
Member

@tombruijn tombruijn commented Sep 12, 2024

Ignore Errno::EPIPE error causes when reading body

We got another report of the Puma::ConnectionError error being reported when upgrading our Ruby gem. The error cause is always the already ignored Errno::EPIPE error.

It is reported by our response body wrapper that's called when instrumenting response bodies.

In this case the error was:

Puma::ConnectionError: Socket timeout writing data

The cause of this error was this error:

Errno::EPIPE: Broken pipe

This doesn't look like an error people can act on to fix it, let's ignore it instead.

Related issue https://github.com/appsignal/support/issues/315

Add error specs for BodyWrapper close method

I noticed I broke something earlier while writing the previous commit in the close method, but it didn't fail any specs. That's because there weren't any for the error reporting. Add these errors so we can be sure it works.

Ignore error if nested cause is ignored

Traverse the error causes tree to see if any nested error cause is ignored.

@tombruijn tombruijn added the bug label Sep 12, 2024
@tombruijn tombruijn self-assigned this Sep 12, 2024
@tombruijn
Copy link
Member Author

Support conversation

@tombruijn tombruijn marked this pull request as ready for review September 12, 2024 14:54
@backlog-helper
Copy link


This is a message from the daily scheduled checks.

New issue guide | Backlog management | Rules | Feedback

We got another report of the `Puma::ConnectionError` error being
reported when upgrading our Ruby gem. The error cause is always the
already ignored `Errno::EPIPE` error.

It is reported by our response body wrapper that's called when
instrumenting response bodies.

In this case the error was:

Puma::ConnectionError: Socket timeout writing data

The cause of this error was this error:

> Errno::EPIPE: Broken pipe

This doesn't look like an error people can act on to fix it, let's
ignore it instead.

Related issue appsignal/support#315
I noticed I broke something earlier while writing the previous commit in
the close method, but it didn't fail any specs. That's because there
weren't any for the error reporting. Add these errors so we can be sure
it works.
Traverse the error causes tree to see if any nested error cause is
ignored.
@tombruijn tombruijn merged commit 88703ac into main Sep 16, 2024
122 checks passed
@tombruijn tombruijn deleted the ignore-puma-connection-error branch September 16, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants