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

Page Index macro in large space is bringing down Confluence

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Resolution

      The Page Index macro can be quite memory hungry in large spaces. To prevent it causing out of memory errors in your site, we don't show page excerpts when there are more than 200 pages in the space, and don't list any pages if there are more than 5000 in the space. This 5000 page limit can be reduced further by setting the system property page.index.macro.max.pages to a lower value. For example to lower the limit to 500 set the system property to:

      -Dpage.index.macro.max.pages=500

      More info on how to set system properties for Confluence can be found here.

      Summary

      Page Index macro in large space is bringing down Confluence

      Environment

      • 6.0.0-OD-2016.08.1-0001, server 5.8.18

        Steps to Reproduce

      1. Create a page in a large space (with > 2800 pages)
      2. Insert page index macro
      3. It would take long to be generated.

      Expected Results

      Confluence generates the index on the page the macro is inserted with no issues.

      Actual Results

      Confluence keeps going down with this error:

      2016-02-22 12:29:53.789019500 Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
      2016-02-22 12:29:53.789021500 	at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
      2016-02-22 12:29:53.789024500 	at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
      2016-02-22 12:29:53.789025500 	at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
      2016-02-22 12:29:53.789025500 	at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:292)
      2016-02-22 12:29:53.789026500 	... 27 more
      2016-02-22 12:29:53.789026500 Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
      2016-02-22 12:29:53.789028500 	at org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1171)
      2016-02-22 12:29:53.789028500 	at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
      2016-02-22 12:29:53.789028500 	... 30 more
      

      and

      2016-02-22 12:20:50.137789500 2016-02-22 12:20:50,060 DEBUG [http-bio-1991-exec-8] [atlassian.confluence.event.MonitorableCallerRunsPolicy] rejectedExecution Queue Overflow happened: QueueOverflowEvent{, runnableInfo='com.atlassian.confluence.event.ConfluenceEventDispatcher$$Lambda$390/16819635@1b8ac5a', threadPoolExecutorInfo='java.util.concurrent.ThreadPoolExecutor@a5ae24[Running, pool size = 1, active threads = 1, queued tasks = 192, completed tasks = 8656]'}
      

      Notes

      Error still happens even after the pool size has been increased.

      Workaround 1 (for Confluence Server)

      This is the Confluence Index Macro, which can be enabled/disabled via:

      1. > Add-ons
      2. Choose System from the drop-down
      3. Expand Advanced Macros
      4. Expand the modules on the right side
      5. Locate the index macro and Disable it
      6. Restart Confluence to release the existing threads

      Workaround 2

      1. Search for: macroName:index and you will see all pages containing this macro.
        • Note that your content indexing may need to be rebuilt for this search to work.
      2. Delete the macro from the pages in the search results
      3. Restart Confluence to release the existing threads

      If you prefer to search via the database for a list of pages, you can use this query:

      SELECT c.contentid, s.spacekey, c.title, c.lastmoddate
      FROM CONTENT c
      JOIN BODYCONTENT bc
        ON c.contentid = bc.contentid
      JOIN SPACES s
        ON c.spaceid = s.spaceid
      WHERE c.prevver IS NULL
        AND bc.body LIKE '%ac:name="index"%'; 
      

      This workaround is for Confluence Server. For Confluence Cloud, please contact Support to get a list of pages using this Macro. You could then remove the macro from those pages.

      Attachments

        Issue Links

          Activity

            People

              zgilovitz Ze'ev (Inactive)
              nghanis Nithiyaa Ghanis (Inactive)
              Votes:
              17 Vote for this issue
              Watchers:
              48 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: