camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Achim Nierbeck <>
Subject FTP download of bigger files gives me OOM
Date Thu, 25 Oct 2012 14:51:10 GMT

using Camel 2.10.2
I have a ftp endpoint that downloads a couple of files from a remote
FTP server.
There are different files located on this server, some of them are
about 700 MB size.
Now every time I start the route for downloading it gives me a OOM
when trying to download this file.
The route is configured to use the *localWorkDirectory*.
Roughly the route does something like the following:

    ... ommited the exception part ....
    ... omitted the onCompletion part ....
         .... stop the whole thing here ...

I tried to increase the memory up to 3GB for the Heap size with no luck.

Following Stacktrace is logged:
Camel (rootContext) thread #28 - ftp://usrXXX@ServerXXXX/
  at java.lang.OutOfMemoryError.<init>()V (
  at java.util.Arrays.copyOf([BI)[B (
  at[BII)V (
  at org.apache.camel.component.file.remote.FtpOperations.retrieveFileToStreamInBody(Ljava/lang/String;Lorg/apache/camel/Exchange;)Z
  at org.apache.camel.component.file.remote.FtpOperations.retrieveFile(Ljava/lang/String;Lorg/apache/camel/Exchange;)Z
  at org.apache.camel.component.file.GenericFileConsumer.processExchange(Lorg/apache/camel/Exchange;)V
  at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(Lorg/apache/camel/Exchange;)V
  at org.apache.camel.component.file.GenericFileConsumer.processBatch(Ljava/util/Queue;)I
  at org.apache.camel.component.file.GenericFileConsumer.poll()I
  at org.apache.camel.impl.ScheduledPollConsumer.doRun()V

The attached OOM-Camel.PNG shows what the Memory Analysis tells me.

Am I missing something critical here? Or do I have to tune up the
memory for those kind
of cases?

Thanks and regards, Achim

Apache Karaf <> Committer & PMC
OPS4J Pax Web <>
Committer & Project Lead
OPS4J Pax for Vaadin
<> Commiter & Project
blog <>

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