Confluence does not start due to "Cannot allocate memory or error=12, Not enough space"
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Summary
Confluence may fail to start if the OS does not have enough memory.
Diagnosis
A similar error might be seen in Tomcat logs (catalina.out).
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007fdafd29e000, 16384, 0) failed; error='Not enough space' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 16384 bytes for committing reserved memory.
[thread 8765 also had an error][thread 8792 also had an error]
# An error report file with more information is saved as:
# /tmp/hs_err_pid8044.log
Cause
This typically occurs when the system's physical memory (RAM) and swap space are fully utilized or fragmented, preventing the JVM from obtaining the necessary memory to proceed.
Solution
To resolve this issue,
- You may need to free up system memory by closing other applications,
- Increasing available swap space,
- Adjusting the JVM heap size settings to better fit the system's memory constraints.