-
Notifications
You must be signed in to change notification settings - Fork 896
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
RequestTimeout is 503 with ThrottlingStrategy #5637
Comments
If you enable this line, which sets the server error handler, |
@minwoox , Yes, I enabled that line and also added logging. I can see that it reaches the condition and returns the 408. Ideally we would not be using a custom error handler to resolve this. It seems that the default error handler is not being used when the throttling strategy is enabled. Is that something you could do? If we do have to enable a custom error handler, is there a way to get the default one so that we don't have to duplicate the conditions? It appears that the default error handler is package protected. |
That is correct. 👍
I'm not 100% sure but it seems like it's being used. armeria/core/src/main/java/com/linecorp/armeria/server/DefaultServerErrorHandler.java Lines 88 to 90 in 9415115
So I think the server returns 503 if you don't apply your custom error handler. |
This is a follow-on from #5572. I have found that adding a
ThrottlingService
decorator is causing the 408 to be replaced by a 503.You can see this happening in my updated sample. In particular this line is what is resulting in a 503.
Interestingly, adding an arbitrary Decorator doesn't have this same result. For example, adding the following line (without the ThrottlingService) still has the desired 408.
One other observation I have is that there is a correspondence between getting exception logging and the 503.
When I have the
ThrottlingStrategy
and get the503
, I see these logs:When I don't have the
ThrottlingStrategy
I do not see those logs.The text was updated successfully, but these errors were encountered: