kafka 启动 报错cannot allocate memory,即内存不足

错误:

ava HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 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 1073741824 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/soft/kafka_2.12-2.3.0/hs_err_pid2820.log

内存不足:解决方法:

#修改kafka-server-start.sh

export KAFKA_HEAP_OPTS="-Xmx1G -Xms1G"
修改为
export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"

 

你可能感兴趣的:(kafka,kafka)