Repository navigation
Memory not being released by GC after exchange completion — heap keeps growing regardless of component used #1616
Unanswered
gowthamCopilot
asked this question in
Q&A
Replies: 3 comments
|
I thought karvan is design time only. Have you tried using a newer minor version of camel ?4.10.9? |
0 replies
|
yes tried with latest version same issue i am facing |
0 replies
|
We are experiencing the same issue when route is deployed to Kubernetes. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Ask a question
Description:
I'm experiencing a persistent memory issue where JVM heap usage keeps climbing and GC never brings it back to baseline, eventually resulting in
java.lang.OutOfMemoryError: Java heap space. This happens regardless of which source component is used — I've tested with SFTP, timer, and other consumers and the behavior is the same.The route is intentionally minimal to isolate the issue. It does nothing except receive an exchange and log a static string. No
${body}logging, no Groovy scripts, no split/aggregate, no heavy transformations. Despite this, memory grows with every exchange and is never reclaimed by GC.Minimal route to reproduce:
The same behavior occurs if I replace SFTP with a timer or any other source component — it is not specific to SFTP.
Observed behavior:
OutOfMemoryError: Java heap spaceExpected behavior:
Error stack trace:
What I've already investigated and ruled out:
${body}in log statements — Removed. All log statements now use only static strings or header metadata. The issue persists.What I suspect but need help confirming:
FormattingConverter.write(). Could there be a default log pattern in the Karavan-generated project that logs the exchange body automatically (e.g., Camel tracing enabled, or a logback pattern that includes%msgresolving to the body)?exchange.done()andUnitOfWork.done()being called properly to release all references after exchange completion?idempotent: trueis set, does the default in-memory repository grow without bound? Is there a way to configure eviction or switch to a persistent store through Karavan?Questions for the maintainers:
jmap -dump:live,format=b,file=heap.hprof) help diagnose this? Happy to provide one.Grafana observation:
Additional context:
Any guidance on what might be holding references and preventing GC from reclaiming memory would be greatly appreciated. Happy to provide heap dumps,
jmap -histooutput, or any other diagnostics.Thanks!
Variant
Web Application
Container Management (if applicable)
Kubernetes
Operating System (if applicable)
Linux
Version
4.10.2
All reactions