Quantcast

QOS Memory Leak

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

QOS Memory Leak

James Agnew
Hi All,

I'm wondering if anyone on this list has knowledge of the QOS project,
and can shed some light on how it works.

I'm investigating a slow memory leak I have found that seems to
consume all available memory after about 10-20k messages have been
received by an inbound HL7 port using HL7BC. I have tracked this down
to the BaseMessagingChannel class in QOS.

BaseMessagingChannel has an internal map called mTemplatesMap, which
stores MessageExchange objects, keyed to their ID. Each time a
messageexchange is sent through the channel, it is added to the map.
The purpose of this seems to be for the redelivery mechanism to be
able to recover the exchange and re-attempt it if it fails.

The problem is that this map has no methods to remove entries from the
map when they are no longer needed. Literally, it's a private member
(mTemplatesMap) and the class has no calls to "remove()" or "clear()".
The thing that is stumping me is how this isn't resulting in every
single OpenESB user out there experiencing gradual memory leaks (which
I'd assume would have surfaced on this list by now). I'm also stumped
by what would be the right time to remove these entries from the list.

For now, I've worked around this by just not storing anything in this
map (I'm not using the redelivery systemic property anyhow) but
ideally I'd like to make a fix that could be shared with the project.

Any ideas?

Cheers,
James

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: QOS Memory Leak

Paul Perez
Administrator
Hi James,

Good staff, you made an interesting investigation to find from where the memory leak comes from.
At present we are benchmarking an application and we note after few hours the same behavior.
If your company subscribes a support I propose you to send the case to the support.
Unfortunately, from our part and for the moment, I am not able to propose you any solution to solve this issue. But your case ask a very good question about the community capability to solve a case with this level of detail.
Please have a look on my next post.

Regards

Paul Perez

www.pymma.com
www.pymma.com The best services on OpenESB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: QOS Memory Leak

James Agnew
Hi Paul (and anyone else experiencing this issue),

That's actually kind of a relief to hear that others are experiencing
this as well.

I took another look at QoS and after adding a bunch of logging to it,
I figured out how it works. The problem doesn't actually seem too hard
to solve, so I took a crack at it.

I've opened a bug report here:
https://open-esb.dev.java.net/issues/show_bug.cgi?id=2736 and attached
a patched version of the qos.jar that corrects the issue. If you would
be willing to replace all of the qos.jar instances in a test
installation to see if this corrects the memory leak for you as well,
that would be great. (Note that each binding component and service
engine in your server installation will have its own copy, so you'll
have to replace it in a few spots.)

James

On Fri, Mar 26, 2010 at 11:19 AM, Paul Perez <[hidden email]> wrote:

>
> Hi James,
>
> Whaooo, you made an interesting investigation to find from where the memory
> leak comes from.
> At present we are benchmarking an application and we note after fe
> --
> View this message in context: http://n2.nabble.com/QOS-Memory-Leak-tp4799066p4804537.html
> Sent from the OpenESB Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: QOS Memory Leak

Frank Kieviet
Administrator
Hi James,

That's great (in multiple ways), James! As I don't see anybody objecting,
will you commit the fix into the source base? I hope that there will be
build in the next few days so that the fix will make it into the bit that
will be downloadable from the downloads page.

Best,
Frank

Frank Kieviet
OpenESB Community Manager (http://open-esb.org)
Oracle, Monrovia, CA
Tel +1 626 471 6322
Blog: http://frankkieviet.blogspot.com/


> -----Original Message-----
> From: users-return-13630-frank.kieviet=[hidden email]
> [mailto:users-return-13630-frank.kieviet=[hidden email]] On
> Behalf Of James Agnew
> Sent: Saturday, March 27, 2010 16:01
> To: [hidden email]; [hidden email]
> Subject: Re: QOS Memory Leak
>
> Hi Paul (and anyone else experiencing this issue),
>
> That's actually kind of a relief to hear that others are experiencing
> this as well.
>
> I took another look at QoS and after adding a bunch of logging to it,
> I figured out how it works. The problem doesn't actually seem too hard
> to solve, so I took a crack at it.
>
> I've opened a bug report here:
> https://open-esb.dev.java.net/issues/show_bug.cgi?id=2736 and attached
> a patched version of the qos.jar that corrects the issue. If you would
> be willing to replace all of the qos.jar instances in a test
> installation to see if this corrects the memory leak for you as well,
> that would be great. (Note that each binding component and service
> engine in your server installation will have its own copy, so you'll
> have to replace it in a few spots.)
>
> James
>
> On Fri, Mar 26, 2010 at 11:19 AM, Paul Perez <[hidden email]> wrote:
> >
> > Hi James,
> >
> > Whaooo, you made an interesting investigation to find from where the
> memory
> > leak comes from.
> > At present we are benchmarking an application and we note after fe
> > --
> > View this message in context: http://n2.nabble.com/QOS-Memory-Leak-
> tp4799066p4804537.html
> > Sent from the OpenESB Users mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...