I am calling Http Post request using HTTP client in a loop. After a few requests, I am getting java.net.SocketException: Connection timed out. I have tried increasing the timeout in setConnectionTimeout() and setSoTimeout() but still the issue persists.