We have a backend service currently served in front of a HAProxy proxy server for load balancing.
When we shut down the backend service for maintenance, client connecting to the HAProxy is receiving 504-Gateway Timeout
error, which is expected.
However when the backend service is up, the client continue to receive the 504 status code, well into the next day after.
Client is connecting via a connection pool, using Spring RestTemplate
and Apache HTTPClient
.
After client is restarted, the problem goes away. Is there any configuration in HAProxy that caches the connection? Any configuration that we can do to prevent this issue?
Note that if try manually using curl
command, the request can reach the backend without issue.
Thank you.