Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66227

Loading PDF when accessing via IIS with ARR

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.5.0
    • Issue - Attachments
    • None

      Summary

      Some random PDFs cannot be loaded in JIRA when accessing it via IIS proxy with ARR.

      Environment

      Windows OS with IIS proxy

      Steps to Reproduce

      1. Setup an IIS proxy with ARR plugin in JIRA following Integrating JIRA applications with IIS using ARR
      2. Access JIRA with proxy and upload PDF files
      3. Click on the PDF file

      Expected Behaviour

      PDF will be correctly displayed

      Actual Result

      It loads infinitely and throws 502 Bad Gateway Error

      Note

      The PDF is correctly displayed when bypassing the proxy

      Workarounds

      • By jconroy:

        ARR proxy has a default chunk size of 256k. It will download, cache and rechunk the file before it gets sent to the client. ARR also uses a response buffer with a 256k threshold. In my analysis I've found ARR is not able to detect when the last chunk has been received (best guess is pdf-viewer is using a method not supported by ARR). When ARR receives the httpresponse close, anything left in the response buffer is dropped and causes a 502.3 error.

        Resolution:

        Disabling Disk Cache on the proxy server will complete resolve the issue. Additionally I recommend setting the response buffer threshold to 0 and setting the proxy keep-alive timeout from 30 to 180 seconds. Although not required to fix this issue, the response buffer is know to cause issues with real-time bidirectional techniques such as SignalR, and the 30 second keep-alive can cause too frequent disconnects with other applications.

      • Increasing the keep-alive time seems to help in some cases.

        1. Screen Shot 2017-10-30 at 16.19.07.png
          43 kB
          Anna Cardino
        2. Screen Shot 2017-10-30 at 16.19.17.png
          69 kB
          Anna Cardino
        3. Screen Shot 2017-10-30 at 16.19.23.png
          57 kB
          Anna Cardino

              Unassigned Unassigned
              acardino Anna Cardino (Inactive)
              Votes:
              32 Vote for this issue
              Watchers:
              23 Start watching this issue

                Created:
                Updated: