-
Notifications
You must be signed in to change notification settings - Fork 111
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
Resilience4JCircuitBreaker not able to consistently interrupt Timelimiter tasks. #230
Comments
We have a test that specifically tests this Can you identify a difference between your code and the test? |
Thanks Ryan for the response. That test makes sense to me. What I'm observing in my testing is that the thread is marked interrupted but continues to run. It's inconsistent behavior though. Here is the code below TimelimiterImpl does get called which marks the thread as Interrupted, but the thread continues to wait for the backend response. Main concern here is with capacity, if the thread does not get freed up it wont be freed up to handle other requests. |
Can you provide me some sample code that demonstrates the problem? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
I'm using spring-cloud-circuitbreaker with Resilience4j, using Circuitbreaker, Timelimiter, ThreadpoolBukhead components of Resilience4j . Timelimiter is configured to timeout after 15 seconds on any of my requests. Requests correctly timeout after 15 seconds and a TimeoutException is thrown to the clients, but the thread processing the backend response continues running and waits until it gets back a response from the backend.
Versions being used:
Spring: 6.2.1
Spring Boot: 3.4.0
Spring Cloud Dependencies: 2024.0.0
Spring Cloud CircuitBreaker: 3.2.0
Resilience4j: 2.2.0
TimeLimiter config being used in application.yaml:
resilience4j.timelimiter:
configs:
default:
timeoutDuration: 16s
cancelRunningFuture: true
metrics:
enabled: true
Note: I'm not using annotations to use the Circuitbreaker or the Timelimiter, my application code makes the calls directly.
Debugging info:
I debugged the code in Resilience4JCircuitBreaker and TimeLimiterImpl. It looks like "FutureTask" associated with the Timelimiter is correctly being set to to be interrupted but its not being honored. I' not sure if the issue is in Resiliece4j Timelimiter module or Sping CLouds Resilience4JCircuitBreaker.
Thanks,
GatewayNovice
The text was updated successfully, but these errors were encountered: