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

**URL:** <https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720>\
**Category:** Elasticsearch\
**Created:** [January 21, 2021, 4:58am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720 "2021-01-21T04:58:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumaiya](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@Sumaiya](https://discuss.elastic.co/u/Sumaiya)\
**Post date:** [January 21, 2021, 4:58am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720/1 "2021-01-21T04:58:14Z")

</div>

**Use case** : The Sping boot is calling the AWS Elastic server for the searching for an object through RestHighLevelClient  
**Issue** : On the client-side we see Java Thread Parked from 1 to 6 secs

How do I find out -

1. What is causing the thread park on the client-side of AWS elastic search?
2. Which Elastic search thread picked up this request and why it is parked for too long?

**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 org.elasticsearch.client.RestClient$SyncResponseListener.get() line: 698 org.elasticsearch.client.RestClient.performRequest(String, String, Map, HttpEntity, HttpAsyncResponseConsumerFactory, Header) line: 224 org.elasticsearch.client.RestClient.InternalperformRequest(String, String, Map, HttpEntity, Header) line: 196`

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 21, 2021, 5:07am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720/2 "2021-01-21T05:07:35Z")

</div>

Welcome to our community! 😃

Unfortunately we do not support this AWS service, you will probably need to ask their support how to identify performance issues.

Hopefully someone with Springboot experience can chime in around other ideas on the client side.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 21, 2021, 7:24am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720/3 "2021-01-21T07:24:29Z")

</div>

There's nothing strange on the client side here, this is what I'd expect to see (in versions \<7.0) when the client is synchronously waiting for a response from the server. As Mark says, the question of why it's waiting will need to go to the AWS folks, we can't help you with that.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 21, 2021, 8:02am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720/4 "2021-01-21T08:02:47Z")

</div>

Adding to the previous answers:

Did you look at [Cloud by Elastic](https://www.elastic.co/cloud), also available if needed from [AWS Marketplace](https://aws.amazon.com/marketplace/pp/B01N6YCISK) ?

Cloud by elastic is one way to have access to **all features** , all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas, Maps UI, Alerting and built-in solutions named [Observability](https://www.elastic.co/observability), [Security](https://www.elastic.co/security), [Enterprise Search](https://www.elastic.co/enterprise-search) and what is coming next 🙂 ...

---

<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 18, 2021, 8:02am UTC](https://discuss.elastic.co/t/how-to-debug-java-thread-park-issues-between-client-process-and-the-aws-elastic-search/261720/5 "2021-02-18T08:02:48Z")

</div>

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