Memory usage messages in Clarity system logs (app-system), error Native memory allocation (mmap) failed


Article ID: 125100


Updated On:


Clarity PPM SaaS Clarity PPM On Premise


When starting the Clarity service, an error message similar to the below is thrown, usually on app service, but could be on others as well:
2018/12/17 08:38:09.131 | # There is insufficient memory for the Java Runtime Environment to continue.
2018/12/17 08:38:09.131 | # Native memory allocation (mmap) failed to map 12884901888 bytes for committing reserved memory.
2018/12/17 08:38:09.131 | # An error report file with more information is saved as:
2018/12/17 08:38:09.131 | # /apps/clarity/bin/hs_err_pid000.log
2018/12/17 08:38:09.136 | JVM exited while loading the application


This is usually caused by a misconfiguration of the JVM memory.
Open the properties.xml and look in the JVM parameters line for each server. All the services together will probably make for more memory than the server owns. When setting up JVM it's important to be accounting for other jobs and services that could be needed by the OS and the OS itself.
The Java application is always trying to assign the -Xms as a whole chunk of memory and in this situation is not able to.


Component: PPMENV


the -Xms amount will be the one that will be automatically allocated to the service upon starting it. This is the minimal memory amount. You should be able go as low as 2048 on PPM app server for Xms.
-Xmx is the maximum amount and this will increase (go up and down) with the application use.

To resolve the issue check the amount of RAM on your server.
Then split it for each service, making sure you account for extra RAM left for the server itself to run OS and non-Clarity services.
Example: If your server's RAM is 16GB, you cannot assign 12GB to app, and 4GB to bg. You can run app with 4-6GB and bg with 3GB.
 0. Open the properties.xml
1. Modify the JVM amount for the app server to something like:
jvmParameters="-Xms3072m -Xmx4096m"
2. Recycle the services