[jira] [Commented] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)

2022-07-01 Thread Michael Rambichler (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561592#comment-17561592
 ] 

Michael Rambichler commented on CAMEL-18255:


I have added a example project in github: 
[https://github.com/michael-salzburg/splitMemoryTest.git]

The issue is the mdc logging: 

{color:#FF}camel.springboot.use-mdc-logging=true{color}

Without: Memory Consumption around 100MB. with mdc-logging=true Consumption 
goes up till END. GC does not work.

> Memory Leak with default Route (which includes RetryErrorHandler)
> -
>
> Key: CAMEL-18255
> URL: https://issues.apache.org/jira/browse/CAMEL-18255
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 3.14.1, 3.17.0
>Reporter: Michael Rambichler
>Priority: Major
> Fix For: 3.19.0
>
> Attachments: Screenshot 2022-07-01 at 19.30.44.png
>
>
> We realized a sever memory leak in a standard route:
>  
> I reproduced it and made a simple MemoryAllocation Check.
> Then I realized the usage of RetryErrorHandler
>  
> Just for curiosity i made another test with:  
> ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak 
> does not occure.
>  
> Sample route to reproduce:
>  
> from("scheduler:testScheduler?repeatCount=1")
>                 .log("Starting route test-route")
>                 .process(exchange -> {
>                     Iterator infiniteIter = new Iterator<>() {
>                         private int integer = 0;
>  
>                         @Override public boolean hasNext() {
>                             return true;
>                         }
>                         @Override public String next() {
>                             return String.valueOf(integer++);
>                         }
>                     };
>                     exchange.getMessage().setBody(infiniteIter);
>                 })
>                 .split().body().streaming()
>                     .log("inside split: ${body}")
>                 .end()
>                 .log("test-route never finishes");



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)

2022-07-01 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561567#comment-17561567
 ] 

Claus Ibsen commented on CAMEL-18255:
-

Running as unit test then there is some additonal overhead with the 
NotifyBuilder that comes out of the box with camel-core tests, but these 
objects are not leaking.

> Memory Leak with default Route (which includes RetryErrorHandler)
> -
>
> Key: CAMEL-18255
> URL: https://issues.apache.org/jira/browse/CAMEL-18255
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 3.14.1, 3.17.0
>Reporter: Michael Rambichler
>Priority: Major
> Fix For: 3.19.0
>
> Attachments: Screenshot 2022-07-01 at 19.30.44.png
>
>
> We realized a sever memory leak in a standard route:
>  
> I reproduced it and made a simple MemoryAllocation Check.
> Then I realized the usage of RetryErrorHandler
>  
> Just for curiosity i made another test with:  
> ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak 
> does not occure.
>  
> Sample route to reproduce:
>  
> from("scheduler:testScheduler?repeatCount=1")
>                 .log("Starting route test-route")
>                 .process(exchange -> {
>                     Iterator infiniteIter = new Iterator<>() {
>                         private int integer = 0;
>  
>                         @Override public boolean hasNext() {
>                             return true;
>                         }
>                         @Override public String next() {
>                             return String.valueOf(integer++);
>                         }
>                     };
>                     exchange.getMessage().setBody(infiniteIter);
>                 })
>                 .split().body().streaming()
>                     .log("inside split: ${body}")
>                 .end()
>                 .log("test-route never finishes");



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)

2022-07-01 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561562#comment-17561562
 ] 

Claus Ibsen commented on CAMEL-18255:
-

I cannot reproduce any leak with your sample route above. The objects are 
allocated but can be GC so you can go down to < 30mb when GC kicks in.

> Memory Leak with default Route (which includes RetryErrorHandler)
> -
>
> Key: CAMEL-18255
> URL: https://issues.apache.org/jira/browse/CAMEL-18255
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 3.14.1, 3.17.0
>Reporter: Michael Rambichler
>Priority: Major
> Fix For: 3.19.0
>
> Attachments: Screenshot 2022-07-01 at 19.30.44.png
>
>
> We realized a sever memory leak in a standard route:
>  
> I reproduced it and made a simple MemoryAllocation Check.
> Then I realized the usage of RetryErrorHandler
>  
> Just for curiosity i made another test with:  
> ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak 
> does not occure.
>  
> Sample route to reproduce:
>  
> from("scheduler:testScheduler?repeatCount=1")
>                 .log("Starting route test-route")
>                 .process(exchange -> {
>                     Iterator infiniteIter = new Iterator<>() {
>                         private int integer = 0;
>  
>                         @Override public boolean hasNext() {
>                             return true;
>                         }
>                         @Override public String next() {
>                             return String.valueOf(integer++);
>                         }
>                     };
>                     exchange.getMessage().setBody(infiniteIter);
>                 })
>                 .split().body().streaming()
>                     .log("inside split: ${body}")
>                 .end()
>                 .log("test-route never finishes");



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (CAMEL-18255) Memory Leak with default Route (which includes RetryErrorHandler)

2022-07-01 Thread Claus Ibsen (Jira)


[ 
https://issues.apache.org/jira/browse/CAMEL-18255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561555#comment-17561555
 ] 

Claus Ibsen commented on CAMEL-18255:
-

Can you maybe put together this as an unit test or something that is ready to 
try so we can more quickly jump on this

> Memory Leak with default Route (which includes RetryErrorHandler)
> -
>
> Key: CAMEL-18255
> URL: https://issues.apache.org/jira/browse/CAMEL-18255
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 3.14.1, 3.17.0
>Reporter: Michael Rambichler
>Priority: Major
>
> We realized a sever memory leak in a standard route:
>  
> I reproduced it and made a simple MemoryAllocation Check.
> Then I realized the usage of RetryErrorHandler
>  
> Just for curiosity i made another test with:  
> ({color:#00875a}.errorhandler(no errorhandler){color}) and the memory leak 
> does not occure.
>  
> Sample route to reproduce:
>  
> from("scheduler:testScheduler?repeatCount=1")
>                 .log("Starting route test-route")
>                 .process(exchange -> {
>                     Iterator infiniteIter = new Iterator<>() {
>                         private int integer = 0;
>  
>                         @Override public boolean hasNext() {
>                             return true;
>                         }
>                         @Override public String next() {
>                             return String.valueOf(integer++);
>                         }
>                     };
>                     exchange.getMessage().setBody(infiniteIter);
>                 })
>                 .split().body().streaming()
>                     .log("inside split: ${body}")
>                 .end()
>                 .log("test-route never finishes");



--
This message was sent by Atlassian Jira
(v8.20.10#820010)