I'm definitely setting the done status correctly, or at least now I am.  I
noticed that if you set the DONE status when receiving from the old JMS
endpoint, you get an exception.  If you set the DONE status in your
servicemix-bean when receiving from the new jms endpoint, then it's fine.  I
think that issue with the old endpoint is what had me so screwed up with my
servicemix-bean.  Anyhow, as for the memory issue, when I see the garbage
collection in jconsole, it seems to garbage all but a small amount of memory
each time a message comes into one of my services and finishes processing.
This will continue where the memory usage will slowly creep up. I'll see it
commit an extra meg periodically to the JVM as the memory peaks near the
current allocated heap size.  If I hit the garbage collection button, it
will garbage collect all but the small amount of memory that seems to be
creeping up as each message processes.  If I hit the GC button a few times
it appears that it ends up garbage collecting that slow amount of
accumulating memory.  I'm a little puzzled as to why it doesn't seem like it
garbage collect all the dead objects, but I guess maybe it's just something
in the JVM and maybe I shouldn't worry about it.  I still don't like that it
commits more memory when it shouldn't have to.  So I will just assume that
it's not leaking memory since after hitting the GC button a few times it
seems like it will eventually free the accumulating memory.

On Tue, Dec 23, 2008 at 10:11 PM, Freeman Fang <[email protected]>wrote:

> Ryan Moquin wrote:
>
>> I wanted to do a little probing regarding memory and servicemix.  I
>> was wondering how exchanges between services are stored/persisted.
>> I'm asking because I've been plagued by out of memory exceptions with
>> my heap memory.  Under high load, servicemix can exhaust 1 gig of
>> memory in 3 hours.
>>
>> I finally have been integration testing servicemix services with junit
>> (which is awesome to be able to do by the way), when I run my junit
>> perf test through jprob, I see my memory keep steadily climbing.  When
>> I look at the results, it shows the onMessageExchange method call of
>> my servicemix-bean component as being the place that uses the most
>> memory.  All my services temporary objects get disposed of, but it
>> looks like the MessageExchanges are hanging around.  It particulary
>> points to InOnly and NormalizedMessage as being the biggest offenders.
>>
>>
>>
> Is it possible that your bean didn't set DONE status correctly and send ME
> with DONE back?
>
>  Is servicemix keeping all the exchanges in memory, whether finished or
>> not?  Does my analysis sound correct?  Is there any tweaking I need to
>> do out of the box to have exchanges purged?  I want to make sure I'm
>> correct on the issue and understand what's going on enough to be able
>> to fix it.
>>
>> Thanks, ryan
>>
>>
>>
>
>

Reply via email to