ItemImporter stops with "Too many open files" error
---------------------------------------------------

                 Key: DS-629
                 URL: http://jira.dspace.org/jira/browse/DS-629
             Project: DSpace 1.x
          Issue Type: Bug
            Reporter: Keith Gilbertson
            Assignee: Keith Gilbertson
            Priority: Minor
             Fix For: 1.7
         Attachments: itemimport_toomanyfiles.patch

The Item Importer can fail when loading items with a large number of bitstreams 
on some systems:

java.io.FileNotFoundException:
/tmp/mcg_prep/1544361/pbio.0040276.g004.gif (Too many open files)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at 
org.dspace.app.itemimport.ItemImport.processContentFileEntry(ItemImport.java:1282)
        at 
org.dspace.app.itemimport.ItemImport.processContentsFile(ItemImport.java:1222)
        at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:742)
        at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:608)
        at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:500)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:212)
java.io.FileNotFoundException:
/tmp/mcg_prep/1544361/pbio.0040276.g004.gif (Too many open files)

The attached patch against the trunk closes the file InputStream after an item 
is added to a collection, and fixes the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to