We are seeing a ThreadPark of 249 ms in a 1 node elastic setup, Elastic server version is 6.5.4.
Thread park event is seen when on a sync multiGet operation .
I.e a POST request for multiGet(_msearch)
performRequestAPI
https://artifacts.elastic.co/javadoc/org/elasticsearch/client/elasticsearch-rest-client/6.5.4/org/elasticsearch/client/RestClient.html#performRequest(org.elasticsearch.client.Request)
Thread park event captured from application,
java.util.concurrent.locks.LockSupport.parkNanos(Object, long) line: 226
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(int, long) line: 1033
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(int, long) line: 1326
java.util.concurrent.CountDownLatch.await(long, TimeUnit) line: 282
org.elasticsearch.client.RestClient$SyncResponseListener.get() line: 929
org.elasticsearch.client.RestClient.performRequest(Request) line: 229
Is the thread park caused as the multiget takes more time to find the documents ? or is there a chance that there is a contention. what are the options to avoid threak park in this case.