解决:rocketmq启动报错_Cannot allocate memory

墨蓝 2023-06-20 06:12 178阅读 0赞

1、rocketmq节点启动报错

[root@iZ2zec40jfnlxk4e70dsqkZ rocketmq]# Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 4294967296, 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 4294967296 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/rocketmq/hs_err_pid1595.log

2、解决方案

解决方案:修改/RocketMQ/devnev/bin/ 下的服务启动脚本 runserver.sh 、runbroker.sh 中对于内存的限制,​改成如下示例:

命令:

vi runserver.sh

vi runbroker.sh

修改示例:

  1. JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"

发表评论

表情:
评论列表 (有 0 条评论,178人围观)

还没有评论,来说两句吧...

相关阅读