SocketTimeOutException and ConnectionClosedException with JestClient

737 Views Asked by At

We are using JestClient to connect to Elastic search.(io.searchbox.client.JestClient). And using executeAsync method to write to Elastic search. We have same code deployed on different enviornment like dev, test,..prod.

On Dev with nominal load we observed intermittent exception as below:

org.apache.http.ConnectionClosedException: Connection closed
    at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.endOfInput(HttpAsyncRequestExecutor.java:341)

while on stage and prod with heavy load we observed exception as :

java.net.SocketTimeoutException: null
    at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(HttpAsyncRequestExecutor.java:371)

But we don't see any data loss. Everything is persisted correctly. One of the blog says timeout exception is bug in apache asynch http client

https://github.com/elastic/elasticsearch/issues/24069

Is this correct? Do we have any solution around it?

Any hint about SocketTimeouException?

Elastic search version is 2.4.4

0

There are 0 best solutions below