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
$Close

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
com.rabbitmq.client.impl.ChannelN

any idea, what can be going wrong?

regards, Yogesh

Search Discussions

  • Emile Joubert at Jan 31, 2012 at 11:54 am
    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
    $Close

    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
    com.rabbitmq.client.impl.ChannelN

    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.



    -Emile

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedJan 31, '12 at 9:56a
activeJan 31, '12 at 11:54a
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Emile Joubert: 1 post Yogesh Ketkar: 1 post

People

Translate

site design / logo © 2022 Grokbase