Details
-
Suggestion
-
Resolution: Duplicate
-
None
-
None
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
- duplicates
-
CONFSERVER-6697 Allow configuration of timeouts for any http request made by Confluence
- Closed
- is related to
-
CONFSERVER-7602 Perform external HTTP requests in another thread
- Closed