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

A way to catch Puma parser-level errors and send them to exception trackers? #894

Closed
rafbm opened this issue Feb 21, 2016 · 0 comments
Closed

Comments

@rafbm
Copy link

rafbm commented Feb 21, 2016

I’ve seen this error in our logs:

HTTP parse error, malformed request (): #<Puma::HttpParserError: HTTP element REQUEST_PATH is longer than the 2048 allowed length (was 2459)>

I understand busting the 2048 limit is not very smart, but I think we should be able to catch those somehow. I did configure lowlevel_error_handler but this only catches errors from the Rack stack.

Currently the only solution I can think of is adding a Logentries alert matching Puma::HttpParserError. Would be better than nothing, yet I’d rather have those errors sent to Rollbar instead.

Is there any way to have those parser-level errors caught in Ruby land and reported to exception trackers?

If not, are there many other unlikely-yet-possible parser-level errors apart from REQUEST_PATH max length? Would it be wise to write them all somewhere in the Puma doc, or at least point to some files in the Puma .c/.java source where there are all located? Or as a last resort, suggest using a log-based monitoring solution like I described above?

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

1 participant