# Java Heap Space Error (Elastic cluster or Client application)

**URL:** https://discuss.elastic.co/t/java-heap-space-error-elastic-cluster-or-client-application/208402
**Category:** Elasticsearch
**Created:** [November 18, 2019, 11:41pm UTC](https://discuss.elastic.co/t/java-heap-space-error-elastic-cluster-or-client-application/208402 "2019-11-18T23:41:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hym](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hym/32/22399_2.png) [@hym](https://discuss.elastic.co/u/hym)
#### Post date: [November 18, 2019, 11:41pm UTC](https://discuss.elastic.co/t/java-heap-space-error-elastic-cluster-or-client-application/208402/1 "2019-11-18T23:41:51Z")

</div>

I have an application that sends too many queries to ELS (elastic search) cluster (both search and multi-search and sometimes scroll). I use java transport client for connection. Now I am getting this into the logfile of my application

[elasticsearch[_client_][transport\_client\_boss][T#12]][AbstractChannelHandlerContext:149] An exception 'java.lang.OutOfMemoryError: Java heap space' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:  
java.lang.OutOfMemoryError: Java heap space

I have some questions:

- this "Java Heap Space" happens in the ELS cluster or in my own application
- where does this T#12 belong to? (ELS or my java application)

Thanks in advance

---

<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: [December 16, 2019, 11:41pm UTC](https://discuss.elastic.co/t/java-heap-space-error-elastic-cluster-or-client-application/208402/2 "2019-12-16T23:41:52Z")

</div>

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