camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Stevenson <qu...@pronoia-solutions.com>
Subject Re: Memory management
Date Mon, 25 Apr 2016 22:46:49 GMT
If you force a GC after the activity dies-down, is the memory recovered?


> On Apr 25, 2016, at 4:01 PM, Jeff Segal <jeffrey.segal@gmail.com> wrote:
> 
> I've got a set of routes that make a bunch of web service calls in quick
> succession, convert the XML to JSON and then save the results off to
> MongoDB. This occurs on a scheduled basis (using the scheduler component,
> configured to run every few hours typically).
> 
> Functionally, it works great. But I've started looking into the memory
> usage and have a few concerns. Primarily, I've been able to cause linear
> heap growth by increasing my total data set to be processed. My
> expectations were that generally adding more calls would slow the process
> down and cause higher spikes, but not linear memory growth over time. When
> I dug deeper in JProfiler, I found that even after all the initial activity
> died down for a given run (i.e., no more in-flight Exchanges), the majority
> of my memory consumption was Strings being held in the 'in' property of
> DefaultExchange objects. This seemed strange since I expected those all (or
> most) Exchanges to complete and be GC'd by that point (it holds steady for
> long periods of inactivity).
> 
> Is there an important cleanup step that I might be missing in my routes?
> I'd include them but they're pretty complex and might muddy the waters here.
> 
> Thanks,
> Jeff


Mime
View raw message