camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <>
Subject Large Number of threads getting spawned in File Producer
Date Tue, 04 Feb 2014 11:33:18 GMT
Hi All,

I am using Camel 2.12.1. I have a route which consumes files from a FTP Server and places
them on the local disk. 


Now I have 10000 files(around 10kbs in size) on the FTP source directory. When I start my
route,I see a lot of "file:destination_dir" threads created and in TIME_WAITING state during
profiling. Roughly,there is a thread for each file that the FTP Consumer picks from the FTP
server(2000 threads for around 2000 files) after which the JVM crashes due to OOM. 

It seems the file producer creates a new thread for every file that is consumed from its default
thread pool. 

How can I restrict the number of threads? Or why are all the threads are in a TIME_WAIT state?

Any help is highly appreciated.

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