Reputation: 13
I'm using Spring Boot RestTemplate to call REST API.
On PROD, I'm getting below exception:
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://<host>/v2/graphql": Connection reset; nested exception is java.net.SocketException: Connection reset
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:711)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602)
The request from client is reached to gateway and gateway also forwarded it to the server. Server has successfully processed the request, but the connection was reset in less than 5 secs.
These are the http configs for the RestTemplate:
connectionRequestTimeoutMs: 3000
connectTimeoutMs: 3000
readTimeoutMs: 3000
maxConnectionsTotal: 100
maxConnectionsPerRoute: 100
In total 2300 requests, only 8 requests are failed with connection reset error, but I want to understand why this is happening.
Any help would really be appreciated. Thanks in advance!
Upvotes: 0
Views: 3460