SocketTimeoutException: null

I am having a cluster on elastic.co and I have there basically 5 indexes. 1 of them has many write operations ( like 100 a minute ), where some of them are also bulk inserts.
the other indexes are mainly there for reading and there are like 50 read operations a minute, but it is just written like a few times a day.

So currently I get about 300 times a day a SocketTimeoutException: null, host not reachable Exception on my Java Client.

Any ideas what I could change in the cluster to fix it or improve it?

Do you have monitoring enabled? If so, what does your heap usage look like?

that are the values of the 2 nodes we have

It seems heap is at 75% which is when GC kicks in. If it stays at this level you will need to either reduce heap usage or increase the size of your cluster.

You can pass these two powerful timeout networking properties that can be globally applicable to all protocol handlers that uses java.net.URLConnection:

  • -Dsun.net.client.defaultConnectTimeout
  • -Dsun.net.client.defaultReadTimeout

sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example, for http connections it is the timeout when establishing the connection to the http server. For ftp connection it is the timeout when establishing the connection to ftp servers.

sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from input stream when a connection is established to a resource.

More details about JVM network settings can be found here.

Threads stuck in java.net.SocketInputStream.socketRead0

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.