【Tomcat】Native memory allocation (mmap) failed | 夕湖津のブログ

夕湖津のブログ

問題解決に役立つ情報の提供を目指します

■事象

Tomcat起動時に、catalina.outに下記ログが出力されて起動しない

 

# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2147483648 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/apache-tomcat-8.5.38/bin/hs_err_pid4155.log
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000740000000, 2147483648, 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 2147483648 bytes for committing reserved memory.

# An error report file with more information is saved as:
# /home/apache-tomcat-8.5.38/bin/hs_err_pid4244.log

 

■原因

Tomcatの起動オプションのヒープサイズ(例:-Xmx512m -Xms512m)が、物理メモリを上回っている