RestHighLevelClient SocketTimeoutException
I’ve got an ES cluster(7.x) on my private server, and communicate with it from the Spring Boot app using the elasticsearch RestHighLevelClient. It works fine when I start my application. The problem is – if ES idle for a few minutes – the next request to ES fails with SocketTimeoutException.
java.net.SocketTimeoutException: 60,000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
After this fail, If I try to hit it again, It works successfully.
The sockettimeout is set to 60 seconds for RestHighLevelClient.