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

Prevent outbound HTTP connections during page rendering monopolising database connections

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Duplicate
    • None
    • None
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Macro generation occurs during page load when a connection to the database is held by the session. If an HTTP macro takes a long time to request information from a remote server, the database connection used by the thread is unavailable, and other servlet threads will wait for a connection.

      We can counter this in two ways:

      1. Create a configuration setting for the HTTP timeout so a system administrator can configure a reasonable timeout for RSS and Jiraissues macro requests. Outbound connections will timeout quicker and return their connections to the pool.

      2. Cache negative hits for HTTP-based macros such as Jiraissues and RSS. That is, if the server doesn't respond and we receive an error response, cache the error response and return that for the next half-hour. At the moment we only cache successful results for these macros.

      In the long term, we should probably investigate an asynchronous approach to retrieving this information (probably via AJAX), so the database connections are never held unnecessarily. There are accessibility concerns with doing this, however.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matt@atlassian.com Matt Ryall
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: