Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-2510

PDF and HTML export fails due to 'too many open files' exception

      Happened while running an export (HTML) on the doc. space on c.a.c..

      Cause:
      java.io.IOException: Too many open files

      This seems to be because we open file input streams, but don't close them!

      An example is:

      FileUtils.copyFile(new FileInputStream(attachmentFile), new File(folder.getAbsolutePath() + "/" + attachmentFile.getParentFile().getName()));

      AbstractRendererExporterImpl:147

      In general, when you don't explicitly close the inputstream, then you will have a file handle leak until the object gets garbage collected.

      Searching for all uses of 'FileInputStream' should be able to show which ones aren't closed

            [CONFSERVER-2510] PDF and HTML export fails due to 'too many open files' exception

            Tom Davies added a comment -

            Verified that fewer than 2000 files can be open concurrently on Windows. Created space with 2500 pages, each with two attachments, one an image which appeared twice in the apge, once thumbnailed.

            Able to export this space as HTML, PDF and XML.

            Tom Davies added a comment - Verified that fewer than 2000 files can be open concurrently on Windows. Created space with 2500 pages, each with two attachments, one an image which appeared twice in the apge, once thumbnailed. Able to export this space as HTML, PDF and XML.

            Updating fix-for version

            Charles Miller (Inactive) added a comment - Updating fix-for version

            Tom Davies added a comment -

            Not fixed completely

            Tom Davies added a comment - Not fixed completely

            I thought you guys fixed this? I just had it pop up in both 1.3.5 and 1.4.3 in trying to do an XML export of a space with its attachments. )-:

            Michelle A. Hoyle added a comment - I thought you guys fixed this? I just had it pop up in both 1.3.5 and 1.4.3 in trying to do an XML export of a space with its attachments. )-:

            And InputStreams in general ....!

            There must have been at least 20 instances in code where we won't closing them!

            Nick Faiz [OLD] (Inactive) added a comment - And InputStreams in general ....! There must have been at least 20 instances in code where we won't closing them!

              nick@atlassian.com Nick Faiz [OLD] (Inactive)
              nick@atlassian.com Nick Faiz [OLD] (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: