[rabbitmq-discuss] Thread locked

Steve Powell steve at rabbitmq.com
Fri Sep 16 13:05:14 BST 2011


Jean-Phillipe,

Looking at the small section of the jstack output you gave us, it appears
that this thread is still runnable, and is holding three locks.
   It is doing blocking write IO to a socket, which may very well not be
doing very much (if you have run out of memory more than just in the
JVM).  Just because it is there in the threads, doesn't mean it is related
to the out-of-memory problems you are seeing, though.

In general when out-of-memory exceptions are thrown in Java it is more
interesting to catch them (can we see these exceptions with stack?) and
then to try to track down what  might have happened after the exception
is caught (or not), for often there is no sensible action taken, and tasks
and processes that simply abort can leave system resources (like
sockets?) in an invalid state.  This, in turn, can leave (native) functions
hanging.  This is pure speculation, however.

Since you are using the RabbitMQ Java client, it is worth pointing out
that one source of unintended memory consumption is
QueuingConsumer, which keeps all the messages it might receive
until you take them.  If you don't ever take them out they stay there. 
It is entirely possible to leave a reference around to the consumer
object which might mean that, even if you no longer use a particular
QueueingConsumer, it is not garbage collected later, so it retains
all the messages sent to it.

However, without further information, the out-of-memory conditions
cannot be further diagnosed.
   Perhaps after your upgrade to the latest release you could report
back here to tell us if you are still having problems.  A full jstack
attachment might be more revealing (and an exception stack for
the out-of-memory condition, might help, too).
   Thanks.
Steve Powell
steve at rabbitmq.com
[wrk: +44-2380-111-528] [mob: +44-7815-838-558]

On 9 Sep 2011, at 09:57, <jeanphilippe1.caruana at orange-ftgroup.com> wrote:
> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-September/014991.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110916/a8b7d052/attachment.htm>


More information about the rabbitmq-discuss mailing list