activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <>
Subject Re: (AMQ-cpp) Client memory usage increasing
Date Tue, 18 Nov 2008 11:45:50 GMT
The first thing I would recommend is to try a later release such as the
current 2.2.1, or get the trunk code as its had several more fixes added
since 2.2.1.  There have been some leaks addressed since the 2.1.1
release which could help to resolve the issue.  

The other thing to try if you can't upgrade is to turn off async sends,
its not really implemented very well in that release and has been
deprecated in the upcoming 2.2.2 release in favor of a more robust


On Tue, 2008-11-18 at 03:26 -0800, hiltune4 wrote:
> Hi,
> System: ActiveMQ 5.1, ActiveMQ-cpp 2.1.1, linux 2.6.x, up-to-date PC with
> 1GB RAM, non durable topics, auto ack, no transactions, no persistent
> messages, async send, openwire.
> We are trying to send textmessages and bytesmessages from ActiveMQ-cpp
> producer to ActiveMQ-cpp consumer (separate processes) using 4 different
> topics . The producer does not care if there's any consumers listening the
> topics, and the old messages should simply be discarded after a short period
> from the topic. Both producer and consumer are very simple, using slightly
> modified code from the examples that came with the ActiveMQ-cpp source. The
> messages are sent periodically, and the system should be able to handle high
> number of messages per second. The number of messages sent can be millions
> on our system.
> The problem is, that the memory consumption on both the producer and the
> consumer is increasing steadily while we send or receive messages, until all
> the memory is used and the OS kills the client. We can repeat this also by
> simply sending messages to the topic until all the memory is used, without
> running the consumer. The ActiveMQ broker memory consumption is normal, no
> increase there. According to Valgrind, our clients do not leak memory, and
> everything is released correctly if we close the clients normally. 
> This is the first time we are trying to use ActiveMQ, so there might be some
> simple configuration problems. We have tried several different kind of
> options, for example disabling flow control completely and using very short
> producer->SetTimeToLive value. Most of the settings are default though, and
> nothing we change seem to have any effect on the steady memory consumption
> of the clients.
> So, can anyone give any tips where the problem might be? For example, what
> configuration options you would use on a system, where you want to send
> limitless amount of messages to the broker (Topic), and do not care if
> there's anything consuming them. 

View raw message