[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjms-developer
Subject:    [openjms-developer] RE: Memory Leaks?
From:       "Tim Anderson" <tma () netspace ! net ! au>
Date:       2005-04-19 14:38:53
Message-ID: 000001c544ed$82f63a80$eb7cfddc () xerces
[Download RAW message or body]

There's a couple of things you can do:
1. publish messages with a non-zero timeToLive, so they expire
   if a client doesn't consume them in time

2. use persistent messages
   The garbage collector will clear any peristent messages
   cached in memory, when memory is low.
   See http://openjms.sourceforge.net/config/gc.html for details.

3. throttle your publisher
   There are a few techniques you can use here, the
   simplest being a Thread.sleep() between publications.

There's no new strategy for dealing with this yet in the
latest CVS, although it shouldn't be too hard to implement.

A couple of potential implementations would be to:
1. discard old NON_PERSISTENT messages when a particular
  no. is reached
2. discard old NON_PERSISTENT messages when free memory falls
  below a certain threshhold, irrespective of JMSExpiration property.
3. prevent publication of messages, once a particular no.
  is reached.
4. prevent publication of messages when free memory falls
  below a certain threshhold.

I suspect (2) would be the most useful, but I would be 
interested to know what others think.

Thoughts?

-Tim

> From: Moore, Randy 
> 
> Hi Again,
> 
> I've been experimenting with version 0.7.6.1 and am 
> publishing objects (NONPERSISTANT) to a Topic via the TCP 
> mode. At present I only have on subscriber running, but plan 
> to have multiple ones. Anyway, I publish in bursts of 300 
> objects every 2.5 seconds, and my consumer gets all of them 
> without problems. However. after I send out a total of around 
> 50,000 objects, I get an out of memory exception in the 
> JMSServer. I know I could increase the memory for the JVM, 
> but it appears to me that would only delay the inevitable. We 
> are probably dealing with a memory leak and I was curious if 
> the latest CVS build may have some fixes for these types of 
> problems. With the exception of this problem, I'm quite happy 
> with OpenJMS. It gives me the messaging I need for a near 
> real-time application, without the bloat of a fullup Web or 
> Application server.
> 
> Thanks 
> 
> Randy
> 



-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
openjms-developer mailing list
openjms-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openjms-developer
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic