1. 程式人生 > >cassandra os::commit_memory(0x00000000cc800000, 864026624, 0) failed; error='Cannot allocate memory'

cassandra os::commit_memory(0x00000000cc800000, 864026624, 0) failed; error='Cannot allocate memory'

本章是關於 cassandra 資料庫執行相關錯誤解決
1、錯誤:
日誌:

[[email protected] conf]# tail -f /var/log/cassandra/cassandra.log
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cc800000, 864026624, 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 864026624 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /tmp/hs_err_pid31935.log

解決方法:
調整記憶體引數

vim jvm.options
#引數預設關閉,開啟並修改為512m
#-Xms4g
#-Xmx4g
-Xms512m
-Xmx512m

次解決辦法適用於大多數相關報錯(elasticsearch、neo4j、tomcat等)