# Thread park Event seen in RestClient multiGet \_msearch operation

**URL:** <https://discuss.elastic.co/t/thread-park-event-seen-in-restclient-multiget-msearch-operation/217011>\
**Category:** Elasticsearch\
**Created:** [January 29, 2020, 1:33pm UTC](https://discuss.elastic.co/t/thread-park-event-seen-in-restclient-multiget-msearch-operation/217011 "2020-01-29T13:33:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vyas.radhakrishnan](https://avatars.discourse-cdn.com/v4/letter/v/838e76/32.png) [@vyas.radhakrishnan](https://discuss.elastic.co/u/vyas.radhakrishnan)\
**Post date:** [January 29, 2020, 1:33pm UTC](https://discuss.elastic.co/t/thread-park-event-seen-in-restclient-multiget-msearch-operation/217011/1 "2020-01-29T13:33:46Z")

</div>

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)](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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 26, 2020, 1:33pm UTC](https://discuss.elastic.co/t/thread-park-event-seen-in-restclient-multiget-msearch-operation/217011/2 "2020-02-26T13:33:59Z")

</div>

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