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

ProxyExchange continues waiting for backend response after a Timelimiter Timeout exception. #3653

Open
gatewaynovice opened this issue Dec 24, 2024 · 2 comments

Comments

@gatewaynovice
Copy link

Describe the bug
Spring CloudGateway MVC with CircuitBreaker filter, CircuitBreaker is configured to use Resilience4j Bukhead and Timelimiter modules. Timelimiter is configured to cancel running future. After a request timeout, the ProxyExchange class that submitted request to backend continues to wait for backend response. ProxyExchange is not aware that it is handling a request associated with a cancelled future and is not freeing up the thread/resources associated.

Should the ProxyExchange implementation be aware of future associated with it? If not which component should be interrupting the thread.

Note the client is seeing the correct behavior with the TimeoutException, the concern here is resources associated with a timed out request are not getting freed up.

@spencergibb
Copy link
Member

It can't be aware. Your circuit breaker timeout and http client timeout should be configured so the http client timeout is less than the circuit breaker one

@gatewaynovice
Copy link
Author

Umm...we have multiple circuits with customized Timelimiter timeouts for each, we set the http client timeout to be greater than all of them to support this setup. If http client timeout is less than the circuit breaker(Timelimiter) one, then don't know we can even use Timelimiter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants