Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-60219

'HTTP 504 Gateway Time-out' when storage-to-view converting pages with many static connect macros

      Rendering of pages having many static connect macros (without caching) can cause a gateway timeout if the rendering takes longer than 60 seconds.

      We ran into this when one of our customers exported a single page having a lot of multi-excerpt macros (those are static connect macros).
      Calling the /contentbody/convert/export_view REST API apparently took longer than one minute so the gateway closed the connection.

      This is a critical issue for us, because customers don't think of timeouts when adding (connect) macros on their pages.

      Steps to reproduce:

      1. Install an addon providing a 'dummy' static content macro that sleeps three seconds (contact cli@atlassian.com for this) 
      2. Insert 20 of the dummy macros into a Confluence page. Alternatively, POST the following JSON containing twenty of these macros to <your- site>/wiki/rest/api/contentbody/convert/export_view
        {
            "value" : "<p>before</p> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <ac:structured-macro ac:name=\"dummy\" ac:schema-version=\"1\" ac:macro-id=\"c9a41198-7f37-4009-842f-d263f02409d6\"/> <p>after</p>",
            "representation" : "storage"
        }
      1. You'll run into a '504 Gateway Time-out' after exactly one minute.

      Investigation Results: 

      I think the problem is that currently the Confluence page waits for all macros on the page to send back a response before rendering all of them. Because of this, when one macro times out, the entire page cannot be rendered.

      Solution:

      Refer to Steven's comment. 

            [CONFCLOUD-60219] 'HTTP 504 Gateway Time-out' when storage-to-view converting pages with many static connect macros

            Ashish Shirode made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Gathering Impact [ 12072 ] New: Closed [ 6 ]

            This was fixed some time back.

            Ashish Shirode added a comment - This was fixed some time back.
            Simon Kliewer made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee, Xenophilius Lovegood, Albus Dumbledore [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005, 7020, 7036 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee, Xenophilius Lovegood, Albus Dumbledore, SoftServe Sprint 78 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005, 7020, 7036, 7049 ]
            Simon Kliewer made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee, Xenophilius Lovegood [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005, 7020 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee, Xenophilius Lovegood, SoftServe Sprint 75 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005, 7020, 7036 ]
            Simon Kliewer made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, Recursing Chatterjee, SoftServe Sprint 73 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005, 7020 ]
            Anand Kashyap made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, Strange Fermat, SoftServe Sprint 72 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987, 7005 ]
            Tapan Parikh made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Focused Margulis, SoftServe Sprint 70 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977, 6987 ]
            Tapan Parikh made changes -
            Sprint Original: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890 ] New: Carmen, SpiderMan, Pop goes the Weasel, Pretty Panda, Confident Crab, WFH Bat, WFH Pangolin, WFH Armadillo, Nesting Sparrow, Gracious Perlman, Gracious Perlman 2 [ 5424, 5669, 5680, 5706, 5729, 5748, 5825, 5835, 5850, 6890, 6977 ]
            Mariia Kozina (Inactive) made changes -
            Labels Original: CE-671 cc-integration grooming-ready New: API CE-671 NMI14 cc-integration grooming-ready
            Ashish Shirode made changes -
            Assignee New: Ashish Shirode [ 89741866c57b ]

              89741866c57b Ashish Shirode
              9a0e36f56f3a Jens Henrik Jens Henrik
              Affected customers:
              1 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: