Index flush trigger causes poor performance

Platform Notice: Data Center Only - This article only applies to Atlassian apps 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

Problem

Performance is poor. Generating a Thread Dump contain threads like:

at $Proxy29.flushQueue(Unknown Source) at com.atlassian.confluence.search.lucene.IndexQueueFlusher.executeJob(IndexQueueFlusher.java:30) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)

Diagnosis

  1. For versions prior to 3.1 only:

    1. Download the version-specific file of the zipped attachments on this page.

    2. Extract the contents to WEB-INF/classes/com/atlassian/confluence/search/lucene (you may need to create these directories).

  2. For all versions:

    1. Add a Logging and Profiling setting for com.atlassian.confluence.search.lucene at level DEBUG.

When the queue next flushes you should see a line like:

[confluence.search.lucene.DefaultConfluenceIndexManager] flushQueue Flushed 10 items in 236 milliseconds

Cause

The index flush trigger is running. This may or may not be a problem. This is a normal operation of Confluence, and is only problematic if the operation is taking too long, as seen in the diagnosis. 5 or 6 seconds is probably too long.

If you're experiencing an outage, and seeing search, recently updated and blog posts macros are waiting (as visible from Generating a Thread Dump), assess what might be hitting the index hard. Some possible candidates:

  • Large attachments or pages or attachments added in bulk by the WebDav plugin.

  • Pages uploaded from the Remote API (assess your script)

  • The index flush operation can be exacerbated by page restrictions. See the Page Restrictions Performance Considerations page for more details.

Solution

Resolution

  1. Avoid page restrictions on large page hierarchies, or disable page permissions completely. You can do this on a space-by-space basis by not granting the "Restrict" permission in the space permissions screen.

  2. limit attachment size or attachment type

  3. For versions below Confluence 5.9, an option would be to (Archived) How do I modify the frequency of content indexing?. For example, change it to every five minutes:

    <bean id="indexQueueFlushTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> <property name="jobDetail"> <ref bean="indexQueueFlushJob"/> </property> <property name="cronExpression"> <value>0 0/5 * * * ?</value> </property> </bean>

Updated on September 26, 2025

Still need help?

The Atlassian Community is here for you.