# Java heap space on report

**URL:** <https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting, database\
**Created:** [September 16, 2023, 10:06am UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250 "2023-09-16T10:06:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanan\_Manickam](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@saravanan\_Manickam](https://forum.inductiveautomation.com/u/saravanan_Manickam)\
**Post date:** [September 16, 2023, 10:06am UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/1 "2023-09-16T10:06:03Z")

</div>

I'm facing a this issue randomly that "Error getting sample data.".

even my ignition app max heap was 4096

ExecutionException: java.lang.OutOfMemoryError: Java heap space caused by OutOfMemoryError: Java heap space

in the report I have used 6 named query inside all store prodcure and 1 basic sql query

due to this issue the report was not loaded.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 16, 2023, 12:09pm UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/2 "2023-09-16T12:09:57Z")

</div>

You will probably need to increase your gateway memory in the ignition.conf file, not the client memory. Reports run at the gateway level.

---

<div class="post-metadata">

**Author:** ![saravanan\_Manickam](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@saravanan\_Manickam](https://forum.inductiveautomation.com/u/saravanan_Manickam)\
**Post date:** [September 19, 2023, 5:32am UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/3 "2023-09-19T05:32:58Z")

</div>

yeah , Even it's 16384 mb is there

`# Initial Java Heap Size (in MB)  
wrapper.java.initmemory=1024

# Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=16384`

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 19, 2023, 11:24am UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/4 "2023-09-19T11:24:36Z")

</div>

The error says your out of memory. You may need to up the heap space.

Also, set the initial to the same as the max. That way java doesn't have to compete with the OS to get that memory

Are the queries returning any blob data? Or just row data? Is it quite a bit of data?

---

<div class="post-metadata">

**Author:** ![saravanan\_Manickam](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@saravanan\_Manickam](https://forum.inductiveautomation.com/u/saravanan_Manickam)\
**Post date:** [September 21, 2023, 5:35am UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/5 "2023-09-21T05:35:05Z")

</div>

not a big data , row data only countable but there is 3 pages in that single report with multiple table simple ,crossed ..

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [September 21, 2023, 12:11pm UTC](https://forum.inductiveautomation.com/t/java-heap-space-on-report/79250/6 "2023-09-21T12:11:51Z")

</div>

What does your normal memory usage look like? It could be that you have just a heavily loaded gateway and the report is pushing it over.

Is all the data just queries or are there scripting data sources in the report?
