activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skarthik <>
Subject Re: 4.0 Consumer OutOfMemoryError bug?
Date Mon, 12 Jun 2006 03:15:22 GMT


Thanks for your valuable time on following up on this issue.

Well, I tried out some more test scenarios over the weekend and now DON'T
think it is a memory leak problem, but definitely some kind of cleanup
problem. Also I would like to reiterate that these issuses did not exist in
RC2 build.

I ran the test programs submitted in JIRA, with following parameters.

Producer publishes messages of 10K size.

The consumer heap was increased to 220 MB, to allow the consumer to store
more than 20,000 messages (if required). Used the default topic prefetch
values. (i think you mentioned it was 4000).
With this heap size, the consumer runs out of memory after consuming around
19,000 messages.

Now increased the consumer heap size to 225MB. Then a peculiar thing
happens. After using up almost all of the heap memory (225 MB, and consuming
about 21500-odd messages), the whole heap (about 210MB) is freed up in one
shot. And this cycle (of using upto 225 MB and then freeing up all of it)
continues after consuming every 21500-odd messages and the consumer never
runs out of memory.

So the question is why does it wait for upto 225 MB of memory to be used up
before some kind of cleanup kicks in.

 BTW, since the memory profile test case reported by Feng (my co-worker) in
the JIRA issue-tracker, involved messages of 64K and a heap size of only
64MB, I can see why it might be difficult to convince that a problem exists.
But I don't think the prefetch size is an issue, since the consumer consumes
the messages at the same rate as the producer, unless the messages are kept
around even after the consumer has processed it (my understanding of
activemq internals/behavior is not deep). Also for our application (not the
test code), we would like to keep the default prefetch size (around

Anyways, hope you guys get a chance to look at this problem as time is
running out for us (we have a deadline to deilver by this month-end). Also
would like to mention that the reason we are stressing on this issue is,
that using activemq 4.0, our actual application (not the test code
submitted) does not pass through our QA department. RC2 build does, but it
has some known issues.


View this message in context:
Sent from the ActiveMQ - User forum at

View raw message