-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add propper handling of 'http2: server sent GOAWAY and closed the connection' #10111
Comments
Hey @ra-coder! Thanks for your suggestion. After discussing it internally, we think that's better to fit with the Go implementation. So we are going to leave the status as "kind/proposal" to give the community time to let us know whether they would like this or not. |
This comment was marked as off-topic.
This comment was marked as off-topic.
can you give any ideas of how long to wait for community feed back ? |
Hello @ra-coder, Regarding your proposal and the use of the 503 status code versus the 500 status code in Traefik. I would like to inquire further about the rationale behind favoring the 503 status code over the 500 status code in this context. While both status codes indicate server errors, they do carry different meanings. A 500 status code typically suggests an unhandled server error (the actual situation from Traefik's point of view), while a 503 status code signals that the server is intentionally unavailable or overloaded. In Traefik, the 503 status code has also a special meaning and reflects an empty server load balancer situation. Could you elaborate on why the 503 status code would be considered more suitable in this scenario? |
hello @rtribotte! When Traefik used as proxy, it returns status code of service behind him, the case above is issue of HTTP/2 witch is most similar to 503 case. Indeed the server behind Traefik (amazon load balanser in my case) is not able to handle the request at the moment, but retry in couple seconds will return 200 httpcode for same request. |
Hello @ra-coder, This is not exactly what is happening, as per this comment, the server behind Traefik did not act expectedly, and an error occurred. If there were no errors on the read operation, Traefik would forward seamlessly the server status code to the client. For that reason (there was an error while reading the response), I think Traefik's behavior is accurate, and a 500 status code is accurate too. Hence my previous question, how a 503 status code would be better than a 500 status code in that case? |
but right now it not even 500, the error is not handled in traefik and frontend got "drop of connection". If you prefer/insist on 500 http code, ok but pls add handling of the error.
|
I was acknowledging this from your original comment. |
Hi! I'm Træfiker 🤖 the bot in charge of tidying up the issues.I have to close this one because of its lack of activity 😞Feel free to re-open it or join our Community Forum. |
Welcome!
What did you do?
In my production installation under big load i get 500 from traefik and next in error log
{"level":"debug","msg":"'500 Internal Server Error' caused by: http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error"}
here is big discussion
golang/go#18639
here is some brif conclusion
https://stackoverflow.com/questions/45209168/http2-server-sent-goaway-and-closed-the-connection-laststreamid-1999/77049485#77049485
I suggest to
handle this error in trafik app and return 503 Busy http code
What did you see instead?
{"level":"debug","msg":"'500 Internal Server Error' caused by: http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error"}
What version of Traefik are you using?
2.9
What is your environment & configuration?
docker_traefik_image: "traefik:2.9"
If applicable, please paste the log output in DEBUG level
No response
The text was updated successfully, but these errors were encountered: