camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radek Kraus <>
Subject HttpProducer endpoint with "unlimited/limited" redelivery - memory leak
Date Mon, 08 Dec 2014 10:53:29 GMT
I have a suspicion on (or better I faced to) memory leak in the following
situation. I use HttpProducer endpoint with "unlimited" redelivery
(configuration problem), but the problem is present for "limited" redelivery
too. Here is simplified route, which I used for problem simulation (finally
I got OOM in this simulation):

return new RouteBuilder() {
  public void configure() {

The problem occurs, when HTTP server returns 404 as response code (for
example when the target "web application" is undeployed from web application
container). In this situation the next/new "synchronization" callback is
registered in each HttpProducer endpoint processing, which caused that we
have a lot of "close" synchronization actions registered on UnitOfWork in
some time (OOM problem in extreme situation) - see exchange,
final boolean closedOnCompletion, which is invoked from HttpProducer, method

Maybe the problem relates to CAMEL-7055, where the synchronization callback
is registered even if closedOnCompletion parameter is false.

I see, that "stream close synchronization" is necessary, mainly for
situation, where we got the valid body response, but maybe for 
"populateHttpOperationFailedException" isn't necessary to register the
synchronization action at all, because the response body is only converted
into java.lang.String.

I would like to ask, if my solution with using redelivery, is based on wrong
idea or I discovered a bug, which should be reported to JIRA.

Thank you for any feedback.
Radek Kraus.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message