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.
Asked
Active
Viewed 291 times
0
-
What is your question? – Jeroen Heier Feb 18 '17 at 07:03
-
Please post an issue to https://issues.apache.org/jira/browse/ROCKETMQ-112?jql=project%20%3D%20ROCKETMQ if you consider it's a problem, you should ask question here but not problem/bug of RocketMQ – JaskeyLam Mar 01 '17 at 06:22
-
I have edited the heading of the question to get more clarification – Kasthuriraajan Mar 06 '18 at 21:23
2 Answers
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