camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Assigned: (CAMEL-1652) Memory leak in File component when using batch processing
Date Thu, 28 May 2009 04:41:50 GMT


Claus Ibsen reassigned CAMEL-1652:

    Assignee: Claus Ibsen

> Memory leak in File component when using batch processing
> ---------------------------------------------------------
>                 Key: CAMEL-1652
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>            Reporter: Christian Schneider
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 2.0-M2
>         Attachments: camel-core.patch
> See
> When using a file endpoint with sorting as start of a route then the files are processed
in a batch. In the current implementation this means a List of exchanges is created and given
to the batch processing. The list is then traversed and each exchange is processed. This means
the list references all exchanges during the whole batch processing. So none of the exchanges
can be collected by the garbage collector till the whole batch is fully processed.
> The problem really becomes bad when the exchanges are large. For example if you use convertBodyTo(String.class)
and the files are large. If you have 100 files with 10 MB each then camel will consume 1 GB
of heap. What is even worse is that it seems the processing simply stops when the heap is
> I have written a small test that shows the problem and a patch that corrects this problem.
I hope this gets into 2.0-M2 as this is a quite serious bug. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message