Issue Details (XML | Word | Printable)

Key: JAMES-612
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Guillermo Grandes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JAMES Server

James File Repository Error: Too many open files

Created: 10/Sep/06 05:48 PM   Updated: 21/Nov/07 08:31 AM
Return to search
Component/s: MailStore & MailRepository
Affects Version/s: 2.3.0
Fix Version/s: 2.3.0

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works too_many_files.zip 2006-09-10 05:50 PM Guillermo Grandes 8 kB
Environment: james 2.3.0rc1, java 1.5, linux

Resolution Date: 10/Sep/06 07:18 PM


 Description  « Hide
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)
----

# 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)
#


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.