Unable to load the Confluence Macro Browser due to timeout exception

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

The macro browser pop-up dialog box remains loading infinitely when trying to add a macro in the Confluence Editor.

The following appears in the atlassian-confluence.log

TIMESTAMP WARN [THREAD] [confluence.util.profiling.DefaultActivityMonitor] close Exceeded the threshold of XXXX ms: ActivitySnapshot{startTime=1465419498350, threadId=2210, threadName='http-nio-8080-exec-92', userId='sgibbs', type='web-request', summary='/plugins/macrobrowser/browse-macros.action?detailed=false&macroMetadataClientCacheKey=XXXXXXXXX'}
 -- referer: https://HOST/CONTEXTPATH/display/SPACE/PAGE | url: /plugins/macrobrowser/browse-macros.action | userName: USER

The error above is thrown when Confluence is trying to access the following URL in order to load the macro browser:

http://<confluence-url>/plugins/macrobrowser/browse-macros.action

Diagnosis

Diagnostic Steps

HAR File
  • Generate a HAR file while trying to open the macro browser in a Confluence page. 
  • Notice that the following REST will likely fail and have an HTTP status of 0

    GET http://<Confluence URL>/plugins/macrobrowser/browse-macros.action
Try to call REST API through Postman
  • Log in to Confluence as an administrator in a Google Chrome browser
  • Download Postman for your browser (or use your own if you have an alternate REST client)
  • Open Postman
  • Get this full URL and input it into Postman under the "Normal" tab, with "GET" from the dropdown. Since you are logged in already in the same browser, the authentication should work without an issue.

    http://<Confluence URL>/plugins/macrobrowser/browse-macros.action?detailed=false
  • This should return some text such as the following, letting us know that the REST call is working along with some timing information. Note that if the timing is significant you are likely running into this issue.

    POSTMAN RESULTS:
    
    Request:
    http://<Confluence URL>/plugins/macrobrowser/browse-macros.action?detailed=false
    Time: 68000ms
    
    Response:
    {
        "macros": [
            {
                "aliases": [
                    "news",
                    "blogs",
                    "blogposts",
                    "blogpost",
                    "blog",
                    "blog-post"
                ],
                "buttons": [],
                "hidden": false,
                "anyParameterRequired": true,
                "icon": null,
                "description": "View, summarise or list the most recent blog posts in the space",
                "pluginKey": "confluence.macros.advanced",
                "title": "Blog Posts",
                "bodyDeprecated": false,
                "alternateId": null,
                "macroName": "blog-posts",
                "gadgetUrl": null,
                "categories": [
                    "confluence-content"
                ],
                "alwaysShowConfig": false
            },

Cause

There are some gadgets that cannot be retrieved from JIRA or any other applications integrated via application links. The timeout happens when the Confluence Macro Browser tries to retrieve the gadget details.

Workaround

Remove any external gadgets + gadget feeds in Confluence Admin >> External Gadgets and see if the macro call is faster. There is usually a gadget that is no longer valid and removing/re-adding the gadget works around the issue. Additionally, this can be caused by slow network communication between applications configured through application links.

Resolution

Make sure there are no major network communication issues between Confluence and the applications configured through application links. It's recommended to follow the guide Application links diagnostics to iron out any configuration issues. 


 

Last modified on Nov 1, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.