0

ActiveMQ 5.13.3 server is running normally.

But when I executed the activemq list command, an error occurred.

Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release  
Java HotSpot(TM) 64-Bit Server VM warning: INFO:os::commit_memory(0x0000000654cc0000, 3946053632, 0) failed; error='Cannot allocate memory' (errno=12)

My question is a little different from here. I am wondering why the execution of activemq list command will report this error.

dai
  • 1,025
  • 2
  • 13
  • 33
  • 1
    Possible duplicate of [JVM crashes with error='Cannot allocate memory' (errno=12)](https://stackoverflow.com/questions/46801741/jvm-crashes-with-error-cannot-allocate-memory-errno-12) – Justin Bertram Nov 11 '19 at 15:44

1 Answers1

0

So the reason is that activemq list starts a new JVM, then connects to broker. The message is telling you that your box doesn't have enough memory to start this second JVM. Either add swap, or add memory to the system.

Also, apache-activemq-5.15.9/bin/env contains the Xms setting for the JVM. This is an unfortunate piece of bad "JVM Tuning Advice" from the past (JDK 1.5 days) that people blindly apply. I'd remove the Xms setting completely and let the JVM resize it's heap as necessary.

Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84