RocketMQ:Cannot allocate memory

时间:2023-03-09 19:22:00
RocketMQ:Cannot allocate memory

使用Storm本地模式消费RocketMQ数据的时候, 消费一点数据之后,就会出现如下错误:

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c7700000, 575143936, 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 575143936 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/post_data/hs_err_pid11957.log

错误截图:

RocketMQ:Cannot allocate memory

尝试修改了RocketMQ的Broker内存大小,之后解决了这个问题。

文件路径:/home/hadmin/rocketmq-4.0.0/bin/runbroker.sh

<修改前>

RocketMQ:Cannot allocate memory

<修改后>

RocketMQ:Cannot allocate memory