Page Properties Report macro takes several minutes to render

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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

 

Summary

Rendering a page with contains a Page Properties Report Macro takes minutes to load completely.

Diagnosis

Despite Using Page Request Profiling on the page itself, there is no specific indication to what activity is delaying the rendering of this specific macro when loading the page:

2023-04-04 14:59:05,359 [http-nio-8090-exec-285 url: /display/TEST, /pages/viewpage.action; user: admin]
[69815.8ms] - /display/TEST
 [69703.5ms] - XW Interceptor: Before defaultStack: /pages/viewpage.action (ViewPageAction.execute())
  [69701.3ms] - SpaceAwareInterceptor.intercept()
   [69701.3ms] - PageAwareInterceptor.intercept()
    [2.6ms] - PageManager.getPageWithComments()
    [69697.8ms] - XW Interceptor: After defaultStack: /pages/viewpage.action (ViewPageAction.execute())
     [69697.8ms] - XW Interceptor: After validatingStack: /pages/viewpage.action (ViewPageAction.execute())
      [69572.5ms] - DefaultRenderer.render
       [69572.4ms] - DefaultRenderer.renderWithResult
        [9.7ms] [count: 32, avg: 0.3ms] - PageManager.getPage()
        [2.1ms] - CrowdService.search()
         [1.8ms] [count: 2, avg: 0.9ms] - MembershipDao.search()
        [1.4ms] - UserAccessor.getGroupNames()
         [1.4ms] - CrowdService.search()
          [1.2ms] [count: 2, avg: 0.6ms] - MembershipDao.search()
        [3.7ms] [count: 20, avg: 0.2ms] - ContentPermissionFilter.bits
        [51782.3ms] [count: 4225, avg: 12.3ms] - DefaultRenderer.render
         [51629.1ms] [count: 4225, avg: 12.2ms] - DefaultRenderer.renderWithResult
        [22.0ms] - DefaultRenderer.render
         [22.0ms] - DefaultRenderer.renderWithResult
          [2.6ms] - Rendering velocity template(vm/status/status-macro.vm)
        [14442.8ms] [count: 862, avg: 16.8ms] - DefaultRenderer.render
         [14409.0ms] [count: 862, avg: 16.7ms] - DefaultRenderer.renderWithResult
      [79.7ms] - XW View: doExecute(/pages/viewpage.vm)
       [79.3ms] - ApplyDecoratorDirective.render()
...
...

(warning) In the example above, the Page Properties Report macro renders in 51629.1ms, but there is no information about any sub-activity that causes it. 


When Generating Thread Dumps very frequently (each 5 or 10seconds), it can be observed that the Page Properties Report Macro is running some Ordering and Comparison activities: 

"http-nio-8090-exec-190 url: /display/TEST, /pages/viewpage.action; user: admin" #45470 daemon prio=5 os_prio=0 cpu=73222.49ms elapsed=88878.94s tid=0x0000561397692000 nid=0xcb0d runnable  [0x00007f178110e000]
   java.lang.Thread.State: RUNNABLE
	at org.springframework.core.OrderComparator.findOrder(OrderComparator.java:145)
	at org.springframework.core.OrderComparator.getOrder(OrderComparator.java:128)
	at org.springframework.core.OrderComparator.getOrder(OrderComparator.java:116)
	at org.springframework.core.OrderComparator.doCompare(OrderComparator.java:86)
	at org.springframework.core.OrderComparator.compare(OrderComparator.java:73)
	at java.util.TimSort.countRunAndMakeAscending(java.base@11.0.16.1/Unknown Source)
	at java.util.TimSort.sort(java.base@11.0.16.1/Unknown Source)
	at java.util.Arrays.sort(java.base@11.0.16.1/Unknown Source)
	at java.util.ArrayList.sort(java.base@11.0.16.1/Unknown Source)
	at org.springframework.core.OrderComparator.sort(OrderComparator.java:174)
	at org.springframework.transaction.support.TransactionSynchronizationManager.getSynchronizations(TransactionSynchronizationManager.java:303)
	at com.atlassian.confluence.core.ConfluenceSynchronizationManager.runOnSuccessfulCommit(ConfluenceSynchronizationManager.java:48)
...
...

Looking further in the stack trace, it can be found some classes related to K15t scroll platform:

...
...
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy3387.convertStorageToView(Unknown Source)
	at com.k15t.scroll.platform.ui.detailssummary.SVDetailsSummaryMacro.renderStorageFormat(SVDetailsSummaryMacro.java:254)
	at com.k15t.scroll.platform.ui.detailssummary.SVDetailsSummaryMacro.renderPagePropertyMacro(SVDetailsSummaryMacro.java:241)
	at com.k15t.scroll.platform.ui.detailssummary.SVDetailsSummaryMacro.lambda$addRenderedPageProperties$2(SVDetailsSummaryMacro.java:204)
	at com.k15t.scroll.platform.ui.detailssummary.SVDetailsSummaryMacro$$Lambda$5651/0x0000000804186040.apply(Unknown Source)
	at java.util.stream.ReferencePipeline$3$1.accept(java.base@11.0.16.1/Unknown Source)
...
...


Cause

The slowness in performance is caused by one of the 3rd party plugins related to Scroll Apps for Confluence. This can be easily confirmed, as the page renders normally after enabling Safe Mode

Solution

Raise a support request with the vendor (K15t) to get technical assistance and troubleshoot further. 

Workaround

There exists a dedicated thread pool for the Page Properties Macro operations, the default value of this pool is 4 threads. Occasionally, customers have improved the rendering of the Page Properties Report Macro by increasing this pool size. 

  1. Increase this System Properties in your setenv.sh file (in the example below, it is increased to 10 threads):

    CATALINA_OPTS="-Dconfluence.masterdetails.thread.pool.size=10 ${CATALINA_OPTS}"
    
  2. Restart Confluence and try render again the affected page.


Last modified on Jan 9, 2024

Was this helpful?

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