Feign timeout doesn't work properly, the response time is far more bigger (approx 1 sec) than the configured timeout (20 ms)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
Hello,
I am using AsyncFeign in a project
Resilience4j version: 1.7.1 or 2.0.2
Spring Boot Version: 3.0.0
Java version: 17
spring-cloud-dependencies: 2022.0.0-RC3
OpenFeign: 4.0.0-RC3
io.github.openfeign:feign-hc5:12.1
We have set the Feign Connection timeout to 10ms and Read timeout to 20 ms. The timeout works and we get a
feign.RetryableException: 20 MILLISECONDS executing GET http://localhost:8082/unstable
but the response is not returned until approx 1030 ms afterward (after more than 1 second in total).
You can see an example of the code in this repo, under the module graphql-java-kickstart-example (ProductClient), it's calling an unstable service also included under the module unstable-service.
This is the current configuration
Thank you in advance
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
Reproduce the timeout behavior using the linked graphql-java-kickstart-example, starting with ProductClient and its application.yml configuration, then inspect the linked unstable-service. Compare the configured 10 ms connection and 20 ms read timeouts with the observed exception and total response time. Done means identifying and correcting the source of the extra delay, with the timeout returning within the configured bounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100