Groups > Weblogic > WebLogic Java Message Service > Re: Why do I run out of memory?




Re: Why do I run out of memory?

Re: Why do I run out of memory?
Fri, 25 Apr 2008 08:33:19 -070
Hi,

It looks like you've narrowed down the test case admirably - MQ isn't even in
the picture anymore, and the OOM only occurs after you start the MDB.  Those are
two big clues.

And yes, you are correct, for a queue, 'pending' only counts messages that are
in-flight.    For your second scenario, where you deploy the MDB after the
messages are sent, 'pending' should be 0 (zero) after you complete sending the
messages but before you start the MDB.   After you start the MDB, pending should
equal around 1 (one) plus the number of messages that are subject to a
redelivery delay.    

Some notes:   

1 - If all that your MDB is doing is forwarding messaging, I highly recommend
using the "messaging bridge" rather than an MDB.   It doesn't need
redelivery delays, but simply pauses forwarding and retries connecting
periodically.    It is also can be far faster than an MDB, as it can batch
multiple messages into a single forward transaction - this performance benefit
may not apply as much in your case as your messages are relatively large.

2 - FWIW A redelivery delay will change the ordering in which you forward the
messages, and so often isn't desirable in a 'forwarding' style application.  If
full ordering is required, search the edoc for the term "ordered
redelivery".   You may want to simply put a "sleep()" in the MDB
instead.

3 - I wonder if the "redelivery delay" messages themselves are somehow
causing the memory leak.  Or perhaps the MDB application itself has a bug - it
could be accumulating messages into some list or table, and never cleaning up
the table.

4 - 9.0 and later provide much more advanced options to handle MDB errors and
delivery ordering, plus it even allows you to browse "pending"
messages via JMX.

Post Reply
about | contact