Page 1 of 1

Unable to allocate memory Error

Posted: Thu Aug 03, 2017 3:58 am
by jyoung
I've just about got this PDF report done using Integrator's PDFDocumentService. It works well with smaller data sets but now I am trying to put some real world data to it and I get a "Unable to allocate memory" error.

Code: Select all

Wed Aug 02 12:36:27 2017
Release 14.1.0 Build 4138 Windows 10 Enterprise Edition (10.0.0.0 Build 10586)
Message : (0885) - Unable to allocate memory. Consider increasing amount of virtual memory. (exception code c0000017) at address 776D0DA6 should be reported to your product vendor as soon as possible by supplying the files X_ERR.LOG and X_RUN.DMP in directory C:\Users\JRYoung\AppData\Local\Temp\.
Routine : X_RUN
The data in question is only about 2000 records, with 10 elements in each record.
And this is only a week's worth of data. I can only imagine what is going to happen for a quarter or a year!

I can load this data fine and present it online. After the header data on each page, I can add about 45 records to a single page. So that comes out to around 44 pages for this one report.

I am assuming this is a JVM issue with Integrator and as I am adding content to the PDF its running out of virtual memory.
If that is in fact the problem, how do I tell Integrator to use more virtual memory?

Re: Unable to allocate memory Error

Posted: Tue Aug 08, 2017 3:29 am
by jyoung
You know when you are looking at a piece of code for a week trying to figure out what is wrong leads you nowhere. Then when you come back from the weekend something in that same code you were staring at jumps out and you'r like hmm, that's not right.

Well just happened to me. :(

Come to find out I had an error in my paging logic that worked for small data sets 1,2 pages but would put itself into an infinite loop on larger ones.

Sigh.

On the plus side however if anyone else needs to adjust the VM options on Integrator here is how you can do it.

Find the JSMMGRDTA.txt file. On Windows its going to be C:\Program Files (x86)\LANSA\Integrator\JSMAdmin
Edit that file and you get adjust the xms and xmx options. You can also turn on tracing for more info.

Code: Select all

Priority=NORMAL
Instance=..\JSMInstance
JVM=C:\Program Files\Java\jre1.8.0_131\bin\java
JVMOptions=-Xms128M -Xmx4096M -Xrs -Djava.endorsed.dirs=.\endorsed
Trace=Yes
Stop and Start the Integrator Service.

If you enabled tracing you should get a *.trc file in the same directory. Open that file in Notepad and you should see something like

Code: Select all

[2017-08-04 11:44:00.404] (pid=13540, tid=08720)                Configuration:
[2017-08-04 11:44:00.407] (pid=13540, tid=08720)                 Instance           : [C:\Program Files (x86)\LANSA\Integrator\JSMInstance] (char*)
[2017-08-04 11:44:00.410] (pid=13540, tid=08720)                 JVM                : [C:\Program Files\Java\jre1.8.0_131\bin\java] (char*)
[2017-08-04 11:44:00.413] (pid=13540, tid=08720)                 JVM Options        : [-Xms128M -Xmx4096M -Xrs -Djava.endorsed.dirs=.\endorsed] (char*)
[2017-08-04 11:44:00.416] (pid=13540, tid=08720)                 Priority           : [NORMAL] (char*)
Which should indicate that it is using the updated settings.