Question: How do I find out -
- What is causing the thread park on the client side
- Which Elastic search thread picked up this request and if it is parked there too?
Use case: The client is calling the Elastic server for the searching for an object through rest API
Issue: On the client side we see Java Thread Parked from 1 to 3 secs
Stacktrace on the client side:
sun.misc.Unsafe.park(boolean, long)
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
com.oracle.es.elasticsearch.client.RestClient$SyncResponseListener.get() line: 698
com.oracle.es.elasticsearch.client.RestClient.performRequest(String, String, Map, HttpEntity, HttpAsyncResponseConsumerFactory, Header) line: 224
com.oracle.es.elasticsearch.client.RestClient.performRequest(String, String, Map, HttpEntity, Header) line: 196
...