Increasing memory usage of Release Automation Agent

Document ID : KB000045000
Last Modified Date : 29/08/2018
Show Technical Document Details
Introduction:

In Some cases the agent are running a memory intensive jobs and the default allocated memory is not enough to run the task. In such scenario the agent logs reflect below error (The error narration may be different in different version of Release Automation)

Exception in thread "Timer-0" java.lang.OutOfMemoryError: Java heap space

Question:
How do we increase the JVM memory settings for the NolioAgent?
Environment:

Release Automation Agent: Linux/Windows

Answer:

In above scenario where to run a memory intensive job by agent we can increase the JVM memory default allocation to higher value. This can be done by following below steps.

Steps to Increase agent memory 

  • Stop the "Nolio Agent" service.
  • Modify file named "wrapper.conf" under the "<RA installation>\NolioAgent\conf" directory. 
  • Uncomment the following lines and set the desired value: 

# Initial Java Heap Size (in MB) 
wrapper.java.initmemory=<Set the initmemory eg. 512> 

# Maximum Java Heap Size (in MB) 
wrapper.java.maxmemory=<Set the Max memroy eg. 1024> 

Note: Remember to assign the value as per the available memory configuration on the server running agent.

  •       Save the file <RA installation>\NolioAgent\conf\custom.wrapper.conf. 
  • Start the "Nolio Agent" service. 

Additional Information:

To verify if the agent started with assigned memory you can do same via JMX. Please follow below steps



 
Additional Information:
Please note: 
Some agents use a 32bit java. Some agents use a 64bit java. You can tell which one you are using by:
  • Opening a command prompt on the agent machine and cd to the NolioAgentInstallDirectory.
  • run: jre/bin/java -version on linux or jre\bin\java -version on windows

If it doesn't explicitly state that it is 64bit then it means that java is 32bit. The reason why this might be important is because 32bit processes have a 2GB memory limitation. This means that you couldn't set the jvm-init or jvm-max settings to something greater than (approximately) 1800.