title: How to configure the socket timeout of the Rest high level client in Spring Data Elasticsearch 2.2.3.RELEASE
body: <p>I use Spring Boot Starter Data Elasticsearch 2.2.3.RELEASE with Elasticsearch v6.8.6. I configured the RestHighLevelClient for the connection to the cluster.</p>
  
  <p>Now I constantly get a SocketTimeoutException on different operations:</p>
  
  <pre><code>java.net.SocketTimeoutException: 5,000 milliseconds timeout on connection http-outgoing-95 [ACTIVE]
  at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(HttpAsyncRequestExecutor.java:387) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:92) ~[httpasyncclient-4.1.4.jar!/:4.1.4]
  at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:39) ~[httpasyncclient-4.1.4.jar!/:4.1.4]
  at org.apache.http.impl.nio.reactor.AbstractIODispatch.timeout(AbstractIODispatch.java:175) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionTimedOut(BaseIOReactor.java:261) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.AbstractIOReactor.timeoutCheck(AbstractIOReactor.java:502) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:211) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591) ~[httpcore-nio-4.4.13.jar!/:4.4.13]
  at java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]
  </code></pre>
  
  <p>Can I configure the socket timeout in the Spring Boot application and if yes, where.</p>
  
  <p>I tried configuring the socket timeout of the ClientConfiguration I create the RestHighLevelClient with which had no effect:</p>
  
  <pre><code>    ClientConfiguration clientConfiguration = ClientConfiguration.builder()
              .connectedTo(nodes)
              .withSocketTimeout(Duration.ofSeconds(30))
              .build();
  
      RestHighLevelClient client = RestClients.create(clientConfiguration).rest();
  </code></pre>