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

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

            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.

            Hi everyone,
            This is Irina from Confluence DC team. Unfortunately current implementation of this api doesn't allow us to solve this problem in efficient way, so we decided to introduce new endpoint /rest/api/content/scan instead. It will be released in version 7.18.
            New endpoint is very similar to /rest/api/content and we recommend to start using it instead of existing one. You could find some examples how this new endpoint could be used at page Confluence REST API examples.

            Irina Tiapchenko added a comment - Hi everyone, This is Irina from Confluence DC team. Unfortunately current implementation of this api doesn't allow us to solve this problem in efficient way, so we decided to introduce new endpoint /rest/api/content/scan instead. It will be released in version 7.18. New endpoint is very similar to /rest/api/content and we recommend to start using it instead of existing one. You could find some examples how this new endpoint could be used at page Confluence REST API examples .

            Dear Atlassian partner,

            For large enterprise, this can cause thread to run for over 12 hours (impacting the DB). 

            Florian Maupas added a comment - Dear Atlassian partner, For large enterprise, this can cause thread to run for over 12 hours (impacting the DB). 

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

                Created:
                Updated:
                Resolved: