Hi Yogesh,
On 31/01/12 09:56, Yogesh Ketkar wrote:
After running a java client for a while (15-20 minutes), it runs out
of memory with OutOfMemoryError.
I probably can postpone the problem by giving high values for -Xmx.

Doing jmap and jhat gave following info.

173233 instances of class com.rabbitmq.client.impl.AMQCommand
173233 instances of class com.rabbitmq.client.impl.CommandAssembler
173132 instances of class com.rabbitmq.client.impl.ChannelN
173132 instances of class com.rabbitmq.client.impl.ConsumerDispatcher
173096 instances of class com.rabbitmq.client.ShutdownSignalException
173096 instances of class com.rabbitmq.client.impl.AMQImpl$Channel

I create a channel at the beginning of run() method of the thread and
close() it in the finally block.
But seems like all see all the instances of

any idea, what can be going wrong?
It is possible that you are creating channels that aren't being garbage
collected by the Java VM. If possible you should use only a small number
of channels and then this problem won't occur. For performance reasons
also you should avoid establishing a new channel for each message as
this introduces network overhead and delay.


Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouprabbitmq-discuss @
postedJan 31, '12 at 9:56a
activeJan 31, '12 at 11:54a

2 users in discussion

Emile Joubert: 1 post Yogesh Ketkar: 1 post



site design / logo © 2022 Grokbase