Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-612

James File Repository Error: Too many open files

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.3.0
    • Labels:
      None
    • Environment:
      james 2.3.0rc1, java 1.5, linux

      Description

      under certain circumstances, too many files are opened and the JVM gives back the following error: FileNotFoundException: "Too many open files"
      at the moment I have been able it to reproduce with high load or stop james with many mails in spoolqueue and start again

      I have been able to see the files that erase of the Spool directory, but they are not closed, can who Mr. Garbage Collector does not release the objects, I have proven to call System.gc(), this workarround works, but the speed is bad.
      Another workarround is set SpoolManager Threads to 1 but is the same speed (turtle).


      2006-09-10 19:15:17,702 WARN [mailstore] Exception caught while storing a stream
      java.io.FileNotFoundException: /opt/james-2.3.0rc1/apps/james/var/mail/spool/4D61696C313135373930383038363735362D363030.Repository.FileStreamStore (Too many open files)
      at java.io.FileOutputStream.open(Native Method)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
      at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
      at org.apache.james.mailrepository.filepair.AbstractFileRepository.getOutputStream(AbstractFileRepository.java:266)
      at org.apache.james.mailrepository.filepair.File_Persistent_Stream_Repository.put(File_Persistent_Stream_Repository.java:66)
      at org.apache.james.mailrepository.AvalonMailRepository.store(AvalonMailRepository.java:299)
      at org.apache.james.mailrepository.MailStoreSpoolRepository.store(MailStoreSpoolRepository.java:124)
      at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvocationHandler.java:134)
      at $Proxy5.store(Unknown Source)
      at org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:326)
      at java.lang.Thread.run(Thread.java:595)


      1. ls -al /proc/XXXX/fd/
        lr-x------ 1 root root 64 Sep 10 19:15 681 -> /opt/james-2.3.0rc1/apps/james/var/mail/spool/4D61696C313135373930383039363437372D383139.Repository.FileStreamStore (deleted)
        #
      1. too_many_files.zip
        8 kB
        Guillermo Grandes

        Activity

        Hide
        technobcn Guillermo Grandes added a comment -

        Full StackTraces & proc-fs info

        Show
        technobcn Guillermo Grandes added a comment - Full StackTraces & proc-fs info
        Hide
        bago Stefano Bagnara added a comment -

        Hi Guillermo, please try upgrading to rc2 or to the latest test build posted by noel in his people.apache.org home directory some day ago.

        After rc1 we fixed a bug related to your problem.

        Please tell us if you can reproduce it after the upgrade!

        Show
        bago Stefano Bagnara added a comment - Hi Guillermo, please try upgrading to rc2 or to the latest test build posted by noel in his people.apache.org home directory some day ago. After rc1 we fixed a bug related to your problem. Please tell us if you can reproduce it after the upgrade!
        Hide
        technobcn Guillermo Grandes added a comment -

        Hello Stefano,

        I have watched the changes of the RC2 and suppose that the patch to which you talked about was JAMES-584. I have updated to the RC2 and I have tested of workload, now works "PERFECT".

        Two birds of a shot

        Thank you very much.

        Show
        technobcn Guillermo Grandes added a comment - Hello Stefano, I have watched the changes of the RC2 and suppose that the patch to which you talked about was JAMES-584 . I have updated to the RC2 and I have tested of workload, now works "PERFECT". Two birds of a shot Thank you very much.
        Hide
        technobcn Guillermo Grandes added a comment -

        Fixed in 2.3.0rc2 - JAMES-584

        Show
        technobcn Guillermo Grandes added a comment - Fixed in 2.3.0rc2 - JAMES-584
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            Unassigned
            Reporter:
            technobcn Guillermo Grandes
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development