C/C++教程

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

本文主要是介绍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 启动 报错cannot allocate memory,即内存不足的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!