If you are unable to create a new account, please email support@bspsoftware.com

 

Contributor - java.lang.outofmemoryerror - Java Heap Size?

Started by jeffowentn, 23 Oct 2012 01:01:51 PM

Previous topic - Next topic

jeffowentn

We had an issue a while back where some users could not open their Contributor applications.  We went in and changed the Java Heap size from 88 to 128, per IBM Cognos support (essentially this article:  http://www-01.ibm.com/support/docview.wss?uid=swg21506479).  We initially tried 256, but that caused errors for us, as well.

It seems we might have some related issues that only present themselves after a user saves or closes their web grid, but the application is already set to 128.  The max is 256.  Is there any increment we should try between 128 and 256?  Do we just arbitrarily choose a number, should it be a multiple of something like 16 or 64, etc.?

Jeff

Danno

I couldn't find a hard answer to this but I would try increasing it to 192 and see what happens. If that causes more issues then revert back and try increasing by increments of 16 until you either solve the issue or exhaust the 256 size limit. If this doesn't resolve the issue I would re-engage Cognos support.

Not too helpful but that is what I would do before going further. Hopefully someone who has experienced this will provide more information for you.

jeffowentn

Thank you, Danno.  We tried 192 with no luck and increased it to 208, per your recommendation.  That did the trick!


jeffowentn

Well.  We are back again.  I've increased the java max setting to 256 and the web grid still will not open.  Anyone have an idea of what to do at this point?  IBM suggests that you should not go over 256.  Given that it has been a while, I'm trying to back the number back down to 192, as having the number too large can cause a problem, too.  Here is the URL for the IBM technote:

http://www-01.ibm.com/support/docview.wss?uid=swg21452622

Any help you can offer would be greatly appreciated.

I did run a model review of the app XML, and I do not see anything concerning, and this is not even close to one of the largest applications we manage.

Jeff

jeffowentn

I backed the JVM max setting back down to 192, GTP'ed, and we are good to go...

rakeshjogi

Usually, OutOfMemoryError occurs because of insufficient Java heap memory allocation, which indicates that your JVM is running out of memory to allocate for objects in the heap.  Even though you've allocated some GB to the container, there could be a possibility that the actual Java heap size being used by the JVM is much lower. This is because, always, JVM by default does not utilize the full container memory unless we instruct to.  In this case, the java.lang.OutOfMemoryError indicates that the application is still running out of Java heap memory despite increasing the size. Since you've already raised the heap from 88 MB to 128 MB and found that 256 MB causes errors, I think it's reasonable to experiment with intermediate values between them.

Heap size does not need to be a multiple of 16 or 64,  you can safely choose any reasonable number such as 160 MB, 192 MB, or 200MB and test the stability and performance. You can slowly increase the heap size and check until the issue no longer occurs. Meanwhile, keep an eye on the application's memory consumption.
Suppose if the  problem reappears, then your application may be experiencing memory leak or there could be inefficient memory usage in the application rather than just insufficient heap size.

Collecting heap dump  and analyzing using the tool HeapHero or EclipseMAT can help identify which objects are consuming the most memory.