How Can We Help?
< Back
You are here:
Print

Fixing wsadmin.sh running out of memory

I have run into problems where the Install EAR step was calling wsadmin.sh to perform the install and it was running out of memory.

It turns out that wsadmin.sh calls a nested copy of java.exe and that is what was running out of memory.  The WAS Install step has a place to put generic options, and we tried to change the max heap by passing ‘-javaoptions -Xmx1024m’, but that didn’t fix the problem.  What the plugin does is creates a jython script that is executed via wsadmin.  The options field was used INSIDE of the script and not as a parameter to wsadmin itself.

Note that it looks like if you pass ‘-javaoptions -Xmx####m’ as a command line parameter to wsadmin, that it does increase the java heap size.  But, the plugin wasn’t doing that.  It may be necessary to create a custom version of the plugin that does that parameter definition.

We did come up with a solution.  It is based on the following articles: https://www.ibm.com/developerworks/community/blogs/timdp/entry/avoiding_java_lang_outofmemoryerror_when_installing_application_with_wsadmin35?lang=en and https://www-01.ibm.com/support/docview.wss?uid=swg1PK70783.  We edited wsadmin.sh on the dmgr machine.  It has a block of script code that assigns a value to the variable PER_JVM_OPTIONS.  We modified that block of code to define -Xmx1024m instead of -Xmx256m.

The specific file modified was: /opt/WebSphere90/AppServer/bin/wsadmin.sh

The primary drawback of this approach is that wsadmin.sh needs to be modified on every dmgr machine that UCD targets.

Leave a Reply

Your email address will not be published. Required fields are marked *

Table of Contents