feign.RetryableException: Read timed out executing GET
Codemia Knowledge Hub ·
feign.RetryableException: Read timed out executing GET means Feign sent the request but did not receive a response within the configured read timeout. Feign treats this as a communication failure that a retry might fix. The usual causes are a slow or overloaded server, an unstable network, or a timeout set too low for the endpoint.
Feign is a declarative HTTP client for Java that hides most of the work of calling remote services, so this exception is often the first sign that a remote call is slow.
What the exception means
RetryableException is raised during request execution when Feign's retry mechanism is triggered, signalling a failure that may succeed on a retry. "Read timed out" means the failure happened in the read phase: the request was sent and acknowledged by the server, Feign waited for the response, and the configured period elapsed first.
Common causes
- Network issues: unstable connections delay responses.
- Server load: an overloaded server takes longer to process requests.
- Configuration errors: a read timeout set too low in the HTTP client configuration times out prematurely.
- Faulty endpoints: unresponsive or broken APIs on the server side.
Ways to reduce read timeouts
Tuning Feign's configuration and timeouts reduces how often you see RetryableException:
- Increase timeout values: use a longer read timeout if the API is known to be slow. With Spring Cloud OpenFeign, set it in
application.yml(milliseconds; replacedefaultwith a client name to target one client):
- Load testing: find bottlenecks and tune the API or client configuration.
- Monitoring: watch for anomalies in response times or server load.
- Circuit breakers: prevent cascading failures and handle intermittent timeouts gracefully.
- Caching: cut repeated requests to endpoints that rarely change.
- Alternative APIs: use alternative endpoints or mirror sites if feasible.
- Connection pooling: reuse connections in the underlying HTTP client for better performance.
Related reading
- Fetch first element of stream matching the criteria
- Field required a bean of type that could not be found. error spring restful API using mongodb
- File to byte[] in Java
- Filter JaCoCo coverage reports with Gradle
- Filter Java Stream to 1 and only 1 element
- Filter order in spring-boot
- Final arguments in interface methods - what's the point?
- final keyword in method parameters
System design interview problems on this topic
- Design an API Rate Limiter: solution and walkthrough
- Design a Distributed Messaging System: solution and walkthrough
- Design an Online Payment Service: solution and walkthrough
- Design a Key Value Store: solution and walkthrough

OOD Fundamentals
Master object-oriented design from first principles, SOLID, design patterns, and classic interview problems with hands-on coding.
View the courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.