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

Hitting the base Content API endpoint can cause performance problem for large instances

      Summary

      The content API endpoint is available to retrieve content from a Confluence instance. While most users pass arguments that help to filter down to specific pieces of content, it is possible to hit the generic endpoint which fetches the entire contents of a given Confluence instance. When this happens, the threads that are tasked to run the operation can run longer than expected, especially with larger Confluence instances. In addition, this is especially true for calls to this endpoint that are made anonymously (as the endpoint contains the @AnonymousAllowed designation) and a Confluence instance is not set up for anonymous access. When this occurs, the operation can still run for a longer than expected time and may ultimately return an empty set to the user.

      Environment

      • Confluence

      Steps to Reproduce

      1. Fill a Confluence with several hundred thousand -> million pages
      2. run the following command curl -X GET http://<baseURL>/rest/api/content | python -mjson.tool

      Expected Results

      1. the operation will run and will not impact performance on the instance

      Actual Results

      1. the operation can be expensive and cause performance to degrade

      Workaround

      Confluence 7.18 and later

      Use http://<baseURL>/rest/api/content/scan instead. Examples how to use endpoint could be found at the page Confluence REST API examples

      Older versions

      Prevent calls to the base end point via networking/proxy rules

          Form Name

            [CONFSERVER-57639] Hitting the base Content API endpoint can cause performance problem for large instances

            Rob made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 643508 ]
            Maksym Fedoryshyh made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 713569 ]
            Maksym Fedoryshyh made changes -
            Remote Link New: This issue links to "Page (Extranet)" [ 713483 ]

            A fix for this issue is available in Confluence Server and Data Center 7.18.0.
            Upgrade now or check out the Release Notes to see what other issues are resolved.

            James Whitehead added a comment - A fix for this issue is available in Confluence Server and Data Center 7.18.0. Upgrade now or check out the Release Notes to see what other issues are resolved.
            James Whitehead made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            Sebastian Haase (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 645814 ]
            SET Analytics Bot made changes -
            UIS Original: 47 New: 71
            SET Analytics Bot made changes -
            UIS Original: 23 New: 47
            SET Analytics Bot made changes -
            Support reference count Original: 32 New: 33
            Irina Tiapchenko made changes -
            Description Original: h3. Summary

            The content API endpoint is available to retrieve content from a Confluence instance. While most users pass arguments that help to filter down to specific pieces of content, it is possible to hit the generic endpoint which fetches the entire contents of a given Confluence instance. When this happens, the threads that are tasked to run the operation can run longer than expected, especially with larger Confluence instances. In addition, this is especially true for calls to this endpoint that are made anonymously (as the endpoint contains the @AnonymousAllowed designation) and a Confluence instance is not set up for anonymous access. When this occurs, the operation can still run for a longer than expected time and may ultimately return an empty set to the user.
            h3. Environment
             * Confluence

            h3. Steps to Reproduce
             # Fill a Confluence with several hundred thousand -> million pages
             # run the following command *{{curl -X GET http://&lt;baseURL&gt;/rest/api/content | python -mjson.tool}}*

            h3. Expected Results
             # the operation will run and will not impact performance on the instance

            h3. Actual Results
             # the operation can be expensive and cause performance to degrade

            h3. Workaround
            h4. Confluence 7.18 and later

            Use *{{http://&lt;baseURL&gt;/rest/api/content/scan}}* instead. See examples how to use
            h4. Older versions

            Prevent calls to the base end point via networking/proxy rules
            New: h3. Summary

            The content API endpoint is available to retrieve content from a Confluence instance. While most users pass arguments that help to filter down to specific pieces of content, it is possible to hit the generic endpoint which fetches the entire contents of a given Confluence instance. When this happens, the threads that are tasked to run the operation can run longer than expected, especially with larger Confluence instances. In addition, this is especially true for calls to this endpoint that are made anonymously (as the endpoint contains the @AnonymousAllowed designation) and a Confluence instance is not set up for anonymous access. When this occurs, the operation can still run for a longer than expected time and may ultimately return an empty set to the user.
            h3. Environment
             * Confluence

            h3. Steps to Reproduce
             # Fill a Confluence with several hundred thousand -> million pages
             # run the following command *{{curl -X GET http://&lt;baseURL&gt;/rest/api/content | python -mjson.tool}}*

            h3. Expected Results
             # the operation will run and will not impact performance on the instance

            h3. Actual Results
             # the operation can be expensive and cause performance to degrade

            h3. Workaround
            h4. Confluence 7.18 and later

            Use *{{http://&lt;baseURL&gt;/rest/api/content/scan}}* instead. Examples how to use endpoint could be found at the page [Confluence REST API examples|https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/]
            h4. Older versions

            Prevent calls to the base end point via networking/proxy rules

              03cb0c04aa4f Irina Tiapchenko
              nlopez@atlassian.com Nancy Lopez
              Affected customers:
              8 This affects my team
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: