spring-cloud / spring-cloud/spring-cloud-gateway
ProxyExchange continues waiting for backend response after a Timelimiter Timeout exception.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ProxyExchange through the Spring Cloud Gateway MVC CircuitBreaker timeout path, focusing on how the cancelled Timelimiter future relates to the backend request. Reproduce the timeout and inspect whether the ProxyExchange thread and associated resources are released; done means the client still receives the timeout while the backend wait is stopped and resources are freed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100