MID Server fails to start when JVM Max Heap Memory is greater than 2 GB


Description

Symptoms

  • After upgrading ServiceNow instance,  new MID server installations will not run with the "wrapper.java.maxmemory" value larger than 1024.

Steps to Reproduce

1. Open the 'agent\conf\wrapper-override.conf'
2. Edit the 'wrapper.java.maxmemory=1024' to reflect 'wrapper.java.maxmemory=4096'
3. Save the 'agent\conf\wrapper-override.conf'
4. Restart the 'ServiceNow Mid Server Service'
5. Observe that the 'ServiceNow Mid Server Service' does not 'Start'

Cause

  • 32-bit JVMs which expect to have a single large chunk of memory cannot use more than 2 Gb heap memory.

Resolution

  • Check if the host machine is using 32-bit JRE Architecture. Navigate to "System Definition -> Scripts - Background" and run the following script ms.log(Packages.java.lang.System.getProperty(‘sun.arch.data.model’)). If the result returns 32 then it is using 32bit Architecture JRE/JDK.
  • Resolution: Download and install 64bit JRE/JDK, then change the wrapper-override.conf file to point to the new installation.