camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omar Atia <>
Subject RE: Garbage collection Execuation ...
Date Thu, 15 Dec 2011 10:29:06 GMT
Finally , after digging a lot with GCs logging etc monitoring etc changing Xmx and Xms
appears that mock uri added in the code was the issue to make old gen FULL .

Mock endpoints keep received Exchanges in memory indefinitely
Remember that Mock is designed for testing. When you add Mock endpoints to a route, each Exchange<>
sent to the endpoint will be stored (to allow for later validation) in memory until explicitly
reset or the JVM is restarted. If you are sending high volume and/or large messages, this
may cause excessive memory use. If your goal is to test deployable routes inline, consider
using NotifyBuilder<> or AdviceWith<>
in your tests instead of adding Mock endpoints to routes directly.

From: Omar Atia
Sent: Tuesday, December 13, 2011 8:15 PM
Subject: RE: Garbage collection Execuation ...

Attached Graph for Old Gen behavior .


-----Original Message-----
From: deckerego []
Sent: Monday, December 12, 2011 6:10 PM
Subject: Re: Garbage collection Execuation ...

If you're seeing objects repeatedly get tenured into old gen, that often is a

symptom of object references never being freed up. In that case it's not a

garbage collection issue but more of a memory leak in your code. Collections

that grow indefinitely or repeatedly creating prototype beans can often be

the cause.

If a leak isn't immediately obvious in code, probably the next best step is

profiling the application and watching where the memory growth is happening.

If you see large byte[] arrays or the like then you may be holding far too

many documents in memory or caching strings at some point.

atiato wrote


> The issue in the old gen heap , it keeps growing while running the stress

> testing it reaches 1.5 GB and keeps the used heap that size even after

> finishing the testing , it keeps the same size I tried GC from JMX nothing

> changed .


> Can you advise if I should pass any parameter to JVM for GC ?


> How can I manage to free the old gen heap to back to original state before

> doing the stress testing after directly finishing the testing I need to

> restore the old heap .



View this message in context:

Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message