# How to debug Java Thread Park issues between client process and the Elastic Search server?

**URL:** <https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-elastic-search-server/182527>\
**Category:** Elasticsearch\
**Created:** [May 23, 2019, 10:24pm UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-elastic-search-server/182527 "2019-05-23T22:24:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jm\_1999](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@jm\_1999](https://discuss.elastic.co/u/jm_1999)\
**Post date:** [May 23, 2019, 10:24pm UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-elastic-search-server/182527/1 "2019-05-23T22:24:20Z")

</div>

**Question** : How do I find out -

1. What is causing the thread park on the client side
2. 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  
...

---

<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:** [June 20, 2019, 10:24pm UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-elastic-search-server/182527/2 "2019-06-20T22:24:26Z")

</div>

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