4 Replies Latest reply on Mar 13, 2013 6:33 AM by mari_yaguchi

    Too many open files when routing files

    mari_yaguchi

      I use camel route to route some files, but then I get error  "too many open files". I use thread here, how can I solve this issue? Is there any maximum thread configuration here?

        • 1. Re: Too many open files when routing files
          ffang

          Hi,

           

          I think this error is caused by somehow you reach the file handler number limitation on your OS. You can adjust it on your OS platform, or post your camel router here so our expert can take a look why so many files not get closed in time.

           

          Freeman

          • 2. Re: Too many open files when routing files
            mari_yaguchi

            Hi,

             

            My camel route looks like this :

             

             

             

            I running this on Centos 6 32bit with 8GB RAM Intel Xeon 3,1GHz

            • 3. Re: Too many open files when routing files
              davsclaus

              Yes you run out of file descriptors on your OSS

               

              Though you also have too high thread pool settings in Camel.

              And each thread pool is NOT shared, so you have 128 routes x their own thread pool.

               

              So in theory you can have at most open

              (500 + 1000) x 128 files.

               

              You may consider sharing the same thread pool with all the 128 routes instead.

               

              For that use a  instead of a profile.

               

              If you have Camel in Action book, then I suggest to check out chapter 10, section 10.1 and 10.2.

              • 4. Re: Too many open files when routing files
                mari_yaguchi

                Thanks for the reply,

                 

                The problem is the OS limits the number of open files per user. So i just need to change the limit. But the maximum number is based on your memory. Thanks.