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

Request line read errors #252

Closed
lucacorti opened this issue Oct 23, 2023 · 2 comments
Closed

Request line read errors #252

lucacorti opened this issue Oct 23, 2023 · 2 comments

Comments

@lucacorti
Copy link

lucacorti commented Oct 23, 2023

We switched from cowboy to bandit and everything seems to be working flawlessly, apart from some errors that have started popping up at runtime:

** (ErlangError) Erlang error: "request line read error: \"Zt8HIXXpbKlriXl5Qkl1x\\\",\\n\""

It looks something is sending malformed requests to our public endpoints, which is totally fine, but somehow these malformed requests then cause a runtime exception which in turn triggers our monitoring system. Wouldn't be better to just log an error in these cases?

thanks!

@mtrudel
Copy link
Owner

mtrudel commented Oct 23, 2023

This is 'by design'; Thousand Island (and by extension Bandit) explicitly log loudly on all abnormal conditions, even they are 'normal' abnormal conditions. This has revealed a number of upstream bugs to date that were being silently discarded by Cowboy. I feel very strongly that this should continue to be the default behaviour of this stack. That having been said, I recognize that some folks are going to want the classic 'silent' behaviour of Cowboy, for any number of valid reasons. I've pushed up PR to Thousand Island to provide a setting that should help in your case:

mtrudel/thousand_island#92

Once that gets reviewed (feel free to chime in!) and merged, I'll cut a new Thousand Island release and you can opt into this behaviour by adding a config like thousand_island_config: [silent_terminate_on_error: true] to your bandit config.

@mtrudel
Copy link
Owner

mtrudel commented Oct 23, 2023

Thousand Island 1.1.0 just released with support for the above flag; updating your dependency and adding the new config point as described above should fix your problem!

Thanks for the issue!

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