Hi, ActiveMQ community,

I'm actively working on a documentation for "out of memory" protection on
ActiveMQ. Recently I was working on this POC project where I stressed a
default broker configuration with 1.000.000 messages with 20KB payload
each, where each message took 1 second to be consumed. It caused the
"Pending Messages" numbers go up pretty fast.

My understanding is that AMQ, out of the box, has the "Producer Flow
Control" feature activated for all Topics and Queues; and it has
"usedMemory" threshold set as 70% of 512MB. Still, with the load I used, I
saw OOM issues. The 1.000.000 messages actually killed the server.

In my tests, I use several threads and nodes to send all the 1.000.000
messages in parallel. That means I have several connections to the broker.
Once I used the sendFailIfNoSpace="true" option, the OOM issues ceased; The
consumers were able to catch up, And the broker survived. One thing that I
noticed is that even when the "Pending messages" number reached 0, it took
some time for the server to allow new producer connections again.

Questions:

* Is it possible that AMQ doesn't count the memory used by each active
connection as variable to the final used memory calculation?

* Is there any configuration where we set a refresh rate so the server
notices faster when the memory is below the maximum threshold again?

* Is the use of sendFailIfNoSpace="true" the ultimate solution for OOM
issues? Is this something I can advise a customer to use so he is 99.9%
guaranteed to not have OOM crashes?

Thanks,
Thiago.

Ps.: I think this is my first message here. :)

Reply via email to