Slow performance and insufficent memory JRE errors with virtualized Jira server
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
- It takes forever to access a Jira page a short while after Jira is started
- the Jira application gets "killed" by the host server
- Memory seems to be used up very fast, even though it never reaches -Xmx.
- Garbage Collection(GC) takes a very long to finish.
Sample GC Viewer:
Diagnosis
- Jira is installed in a Virtual Machine(VM) using VMWare.
When Jira is unresponsive, attempting to stop it results in the following error in the terminal:
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000083000000, 1398276096, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 1398276096 bytes for committing reserved memory. # An error report file with more information is saved as: # /tmp/hs_err_pid2660.log The stop command failed. Attempting to signal the process to stop through OS signal. Killing Tomcat with the PID: 1929 The Tomcat process has been killed.
Cause
Memory Reservation is not enabled for the VM, preventing JIRA from getting sufficient memory allocated for it in a timely manner.
Resolution
Memory Reservation
Enable Memory Reservation for the VM.
Increase Max Map
If unable to work with memory reservation, see if the OS is configured to allow sufficient memory for the JVM to work.
On some Linux distros, this is:
cat /proc/sys/vm/max_map_count
Increase it to the amount of Heap + threshold. Some customers go to 1.5 the Heap size configured to the JVM (Xmx Java opt).
On some distros, this is achieved through (replace 99999 by the amount of memory, like 1.5 the Xmx):
sysctl -w vm.max_map_count=99999
Workaround
Set the minimum and the maximum memory to the same amount as per Increasing Jira Memory.
Related Content