cancel
Showing results for 
Search instead for 
Did you mean: 

OutOfMemory Exception?

Former Member
0 Kudos

Hello,

We're currently building a MAM application for MI Client 2.5 (SP17). We have one process (in a View Controller) that processes more than 100,000 records from the database, and it caused a java.lang.OutOfMemory exception. Does anyone know how we can increase the heap size for the MI Client (i.e. the Tomcat server running it)?

Many thanks!

Jeffrey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jeffrey,

I am assuming that you use a PDA with the MI Client. The crEme comes with a default setting of 32 MB for the heap size, you can verify this by checking the jscpout.txt file in the / (root) directory of the PDA. you can increase it by doing the following. You will find the MobileEngine.lnk file in /Windows/Startup folder, edit it(you have to copy it to a desktop) and add the following -ml 64000, this will change the heap size to 64MB you can also confirm it by checking the jscpout.txt after you softreset the PDA after the editing of the file.

Hope this helps,

Best Regards,

Karthik

Former Member
0 Kudos

Hi Karthik,

Thanks for the quick response! I'm actually using a laptop with the MI Client. Would you know how we can change the heap size? Does anyone know what the default value is?

Thanks!

Jeffrey

Former Member
0 Kudos

Hi Jeffrey,

It is suprising that you are getting an OutOfMemory Exception when you are using the laptop. Anyway I have to get back to office to check the exact method, but I think you should be able to check the heap size by modifying the startup.bat file, you will find this in the 'SAP Mobile Infrastructure' folder.

You should have an option to change the heap size. here

You can check if there is a -xmx option. Change it to -xmx256m to change the heap size to 256MB.

Let me know if this works.

Best Regards,

Karthijk

Former Member
0 Kudos

hi jeffrey,

if you open your startup.bat file you will find the following line:

SET JAVA_OPTIONS=-mx256m

try increasing the value up to 512m

SET JAVA_OPTIONS=-Xms256m -Xmx512m

suggestion: limit your max heap size to around 70% of the physical memory or

you'll system will become very slow or might halt. if this value is too big, the

frequency garbage collecting might be minimize but will consume too much heap.

if too small it is the opposite case.

just my 2 cents

jo

Answers (0)