-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ContextTimeout Middleware is undocumented #2745
Comments
ContextTimeout middleware replaces Request context with context that has timeout configured to it. This is useful for situations when you would want long running processes not to last longer than configured timeout. Maybe you have some kind of SQL reporting query that could take really long time under when SQL server is overloaded. by providing context that limits is duration you can assure that your clients will not wait longer than that time. as that SQL method call will end with echo/middleware/context_timeout.go Lines 59 to 72 in ce0b12a
this is conceptually different from |
Thank you for the explanation. I understand the difference and agree with the recommendation. My question was: why is |
there are no specific reason why |
I cannot find any mention of the ContextTimeout middleware in the documentation.
At the same time, a number of issues as well as the Timeout middleware source code warns against it, but no such warning is present in the documentation.
The text was updated successfully, but these errors were encountered: