# Transport client Memory issue

**URL:** <https://discuss.elastic.co/t/transport-client-memory-issue/52739>\
**Category:** Elasticsearch\
**Created:** [June 14, 2016, 12:52pm UTC](https://discuss.elastic.co/t/transport-client-memory-issue/52739 "2016-06-14T12:52:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anks](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@anks](https://discuss.elastic.co/u/anks)\
**Post date:** [June 14, 2016, 12:52pm UTC](https://discuss.elastic.co/t/transport-client-memory-issue/52739/1 "2016-06-14T12:52:17Z")

</div>

Hi All,

I am using transport client to connect with ElasticSearch. I am using singleton transport client.

My application goes out of memory when load increase. I tried to analyze heap dump and found aggregated query result in jvm.

What would the best approach to solve this memory failure.

Thanks!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2016, 9:32am UTC](https://discuss.elastic.co/t/transport-client-memory-issue/52739/2 "2016-06-16T09:32:06Z")

</div>

Hey,

if you application goes OOM, then possibly the aggregation result is too big? Can you reduce the result by returning less buckets? If the aggregation contains the data you need, you are going to need more heap I guess. Another possibility is, that you have many requests in parallel with big aggs, so trying to reduce the amount of parallel requests (or the aggs size response) might help.

--Alex

---

<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:** [July 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/transport-client-memory-issue/52739/3 "2017-07-05T22:43:22Z")

</div>

Closed on July 5, 2017, 10:43pm UTC


