0

When I refered to rocket mq quick start , I followed the tips: downloading sources and building, ran the sh to start a broker, I got killed tips from os. So I checked the shell script, found heap size was set to 8g by default. Is that too large for a develop machine? And I also get confused when I used maven to building whole project, again got killed tips from os, due to 1g heap size is needed for maven to build the project. I think documents of rocket mq should mention these to help developer really start quicklly.

2 Answers2

0

your machine RAM may be not enough to that size of heap (8g). I have faced a similar problem due to this reason. I have solved in the following way.

Open the distribution/bin/runbroker.sh file of your project and change the following line

JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -Xmn4g"

as

JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g"

now broker will only generate a 4G heap .I hope it will solve your problem.Now you can try to build and run.

Kasthuriraajan
  • 145
  • 2
  • 15
0

If you configure the cluster on a single machine e.q. in docker, make the jdk running space smaller, otherwise it will appear

/home/rocketmq/rocketmq-4.7.0/bin/runbroker.sh: line 158: 28 Killed $JAVA ${JAVA_OPT} $@

Solution:

JAVA_OPT_EXT: "-server -Xms128m -Xmx128m -Xmn128m"
dcnis
  • 61
  • 4