# Jasper report and java.lang.outOfMemory error

**URL:** <https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116>\
**Category:** Classic Servoy\
**Created:** [May 23, 2008, 4:53am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116 "2008-05-23T04:53:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [May 23, 2008, 4:53am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116/1 "2008-05-23T04:53:03Z")

</div>

Hi there,

I am printing around 5000 records (each record in a separate page) so 5000 pages. When I print these many pages I get java.lang.outOfMemory error and the report could not continue.

I think the jasper is trying to load all the pages at once and ends up with the error. In filemaker the records are loaded page by page. I am sure that there must be some settings that we can do to tell the jasper to load the records batch by batch.

Please help!

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [May 23, 2008, 6:58am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116/2 "2008-05-23T06:58:56Z")

</div>

What is your display type for the Report? You use the “view” option to get the viewer?

Since the report is run Serverside and then send back to the Client, the entire report needs to be generated Serverside first, before sending it to the Client.

Where does your Out of Memory occur? ServerSide of clientside?

You know you can increase the Memory that Java can use?

Paul

---

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [May 23, 2008, 7:07am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116/3 "2008-05-23T07:07:30Z")

</div>

I use the “view” option.

Out of Memory occurs in the client side only.

servoy.maxClientHeap: in the servoy admin page where I have to increase the memory right?  
Currently it is set to 256. But you think this solution is good? Can’t the report load the records page by page?

Please help!

---

<div class="post-metadata">

**Author:** ![pbakker](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pbakker](https://forum.servoy.com/u/pbakker)\
**Post date:** [May 23, 2008, 7:35am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116/4 "2008-05-23T07:35:47Z")

</div>

If the Out of Memory occurs Client side, increasing the available memory on the Client is the way to go.

If you want us to investigate if the report can be loaded page by page, please create a Feature Request for that in our support system.

Paul

---

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [May 23, 2008, 7:48am UTC](https://forum.servoy.com/t/jasper-report-and-java-lang-outofmemory-error/9116/5 "2008-05-23T07:48:19Z")

</div>

Ok. First met me increase the memory limit.  
Then let me see if that can help.

Thanks
