Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1882

ZipArchiveSerializer causes "Too many open files" exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8, 2.1.9, 2.1.10
    • 2.1.10, 2.2
    • * Cocoon Core
    • None
    • Normal

    Description

      When ZipArchiveSerializer is used to zip a big number of files, the OS-/Java-dependent limit for open file descriptors can be exceeded, resulting in a corrupt zip file and a "Too many open files" exception in the log.

      Apparenty the reason for this is that the InputStreams created in the addEntry method aren't cleaned up properly. If I add a call

        sourceInput.close();

      after the output has been written, the problem doesn't occur any more. (I've had to do this in the 2.1.7 we're working with, hence no patch file.)

      Attachments

        1. ZipArchiveSerializer.diff
          0.1 kB
          Holger Wahlen

        Activity

          People

            antonio Antonio Gallardo Rivera
            hwahlen Holger Wahlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: