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

James File Repository Error: Too many open files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • None
    • 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)
        #

      Attachments

        1. too_many_files.zip
          8 kB
          Guillermo Grandes

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: