JestClient is throwing SocketTimeoutException after being idle for sometime

I'm using JEST to connect to elasticsearch in a spring-boot application. When the application goes idle for some time, then the JestClient is throwing SocketTImeoutException. I'm creating the client using a bean:

@Bean
public JestClient client() throws Exception {

	JestClientFactory factory = new JestClientFactory();
	factory.setHttpClientConfig(new HttpClientConfig
			.Builder(esURL)
			.multiThreaded(true)
			.connTimeout(60000)
			.readTimeout(60000)
			.defaultMaxTotalConnectionPerRoute(10)
			.maxTotalConnection(100).build());
	return factory.getObject();
}

Is there anything I'm missing here?

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