Java out of memory heap space

We hava one issue as in wM8 as ‘java out of memory heap space’.

So we have checked the server.bat file to increase the memory size.

In wM 7x we have the following commands in the server.bat file:

SETLOCAL

set JAVA_MIN_MEM=256M
set JAVA_MAX_MEM=512M
set JAVA_MAX_PERM_SIZE=128M

So we can change these setting to increase the memory usage.

In wM 8x we don have these kind of options to increase the memory setting since the server.bat file because the following commands were used for the java memory settings:

set JAVA_MEMSET=-Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -XX:MaxPermSize=%JAVA_MAX_PERM_SIZE%
set JAVA2_MEMSET=-Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -XX:MaxPermSize=%JAVA_MAX_PERM_SIZE% -Xrs %XPATH_IMPL% %ALLOW_ARRAY_CLASSLOADING% %USE_80_AUDIT_TBLS% -DWM_HOME="%WM_HOME%"


The above options actually use the settings of JVM rather than the predefined set values.
So ideally we need to increase the memory settings of JVM on which Integration Server is installed. we have tried couple of command line options to increase the JVM memory but they were not working as expected.

java -Xms 256m -Xmx 256m -Xss 256m

We are not sure which jar file should be given in the above command for increasing the memory heap of the JVM for IS.

If any of you have faced similar issues like the one specified above then Please let us know how can we can proceed?

Many thanks in davance

That’s incorrect.

The substitution variables in the server.bat script are being populated by setting the values of the environment variables in another script that is called externally before server.bat is run or called in an earlier step of server.bat.

Find that script and modify the environment variable settings there.

Server.bat is starting a new JVM instance just for IS. There are no settings to retrieve from it before you start it.

Hope that helps,

Mark

hi gautam,

in WM8x there is setenv.bat file under \IntegrationServer\bin\ which has the provision to set the memory parameters to the wmis server use that the same file is also used to set the parameters to external java environment.

regards,
Raj Pamishetty

Thank you All.

Have fixed by doing following.

In webMethods 8, the server.bat decouples these settings to another batch file . In env batch file you can do two operations - heap size settings and classpath settings.

Set appropriate heap size and run this batch file followed by server.bat.

In version 8, this are now set in setenv.bat and not in server.bat.

Modify setenv.bat to get proper values.

If you run as Windows service, modify setenv.bat and after unregister service and register it again.

On top of the comments given by Mark, Raju and Dev, one more thing should be taken into consideration and that is JVM/Java version. Increment of heap size depends upon java version which should also supports your WM version. Which java version you should use in order to get maximum heap size you should check with SAG support.

I think this can have two reasons:

  • Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
  • Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:

java -Xms -Xmx Defaults are:
java -Xms32m -Xmx128m You can set this either in the Java Control Panel or on the command line, depending on the environment you run your application.

ssat exam | toefl exam

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.