[ https://issues.apache.org/activemq/browse/CAMEL-2899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60411#action_60411 ]
Karl Palsson commented on CAMEL-2899: ------------------------------------- Some stack traces... This is without having a file name pattern match filter FATAL [org.apache.camel.component.file.remote.FtpConsumer:CamelThread 4] - <Consumer Consumer[ftp://sm...@localhost:2121/autreq/ok?delay=5000&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02] could not poll endpoint: ftp://sm...@localhost:2121/autreq/ok?delay=5000&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02 caused by: Java heap space> java.lang.OutOfMemoryError: Java heap space at java.util.concurrent.ConcurrentHashMap.<init>(ConcurrentHashMap.java:613) at java.util.concurrent.ConcurrentHashMap.<init>(ConcurrentHashMap.java:652) at org.apache.camel.impl.DefaultExchange.getProperties(DefaultExchange.java:168) at org.apache.camel.impl.DefaultExchange.setProperty(DefaultExchange.java:153) at org.apache.camel.component.file.GenericFile.bindToExchange(GenericFile.java:96) at org.apache.camel.component.file.remote.RemoteFileEndpoint.createExchange(RemoteFileEndpoint.java:50) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:87) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) The two below here were when I had an ant pattern match filter. From the debug logs, it filtered _every_ file, regardless of the max messages per poll FATAL [org.apache.camel.component.file.remote.FtpConsumer:CamelThread 4] - <Consumer Consumer[ftp://sm...@localhost:2121/autreq/ok?delay=5000&filter=%23conaxRequestFilter&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02] could not poll endpoint: ftp://sm...@localhost:2121/autreq/ok?delay=5000&filter=%23conaxRequestFilter&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02 caused by: Java heap space> java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuilder.append(StringBuilder.java:119) at org.apache.camel.component.file.GenericFile.populateHeaders(GenericFile.java:118) at org.apache.camel.component.file.remote.RemoteFile.populateHeaders(RemoteFile.java:39) at org.apache.camel.component.file.GenericFile.bindToExchange(GenericFile.java:99) at org.apache.camel.component.file.remote.RemoteFileEndpoint.createExchange(RemoteFileEndpoint.java:50) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:87) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) FATAL [org.apache.camel.component.file.remote.FtpConsumer:CamelThread 4] - <Consumer Consumer[ftp://sm...@localhost:2121/autreq/ok?delay=5000&filter=%23conaxRequestFilter&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02] could not poll endpoint: ftp://sm...@localhost:2121/autreq/ok?delay=5000&filter=%23conaxRequestFilter&maxMessagesPerPoll=50&move=.processed&passiveMode=true&password=sms02 caused by: Java heap space> java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuilder.append(StringBuilder.java:119) at org.apache.camel.component.file.GenericFile.populateHeaders(GenericFile.java:118) at org.apache.camel.component.file.remote.RemoteFile.populateHeaders(RemoteFile.java:39) at org.apache.camel.component.file.GenericFile.bindToExchange(GenericFile.java:99) at org.apache.camel.component.file.remote.RemoteFileEndpoint.createExchange(RemoteFileEndpoint.java:50) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:87) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) > out of heap space if remote FTP site has too many files to pick up > ------------------------------------------------------------------ > > Key: CAMEL-2899 > URL: https://issues.apache.org/activemq/browse/CAMEL-2899 > Project: Apache Camel > Issue Type: Bug > Components: camel-ftp > Affects Versions: 2.3.0 > Reporter: Karl Palsson > > 2010-07-02 11:38:07,439 FATAL > [org.apache.camel.component.file.remote.FtpConsumer:CamelThread 10] - > <Consumer Consumer[my_ftp_URI_here caused by: Java heap space> > java.lang.OutOfMemoryError: Java heap space > My remote FTP server has ~60k 100 byte files, and the camel endpoint consumer > falls over and doesn't start again. I can use JMX to stop/start the > consumer, (it still has status "started") and it will log in to the remote > server again, but then fall over with the out of heap space. > I can work around this by increasing the heap, or by moving some of the files > aside, but I don't think camel should care how many files there are, or at > least, I think it should deal with it more gracefully. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.