How to Disable the Index Optimization Job in JIRA

Still need help?

The Atlassian Community is here for you.

Ask the community


This page is outdated

tip/resting Created with Sketch.

This article applies to JIRA 5.1.5 and earlier.


  1. HTTP threads are timing out around the time the index optimization job runs.
  2. The index optimization job is taking longer than 30 seconds to finish.

The following appears in the atlassian-jira.log:

2012-08-22 00:00:00,014 QuartzWorker-1 INFO ServiceRunner     [issue.index.job.OptimizeIndexJob] Optimize Index Job running...
2012-08-22 00:01:38,253 QuartzWorker-1 INFO ServiceRunner     [issue.index.job.OptimizeIndexJob] Indexes Optimized. Took: 98237 milliseconds.
2012-08-22 00:01:38,253 QuartzWorker-1 INFO ServiceRunner     [issue.index.job.OptimizeIndexJob] Optimize Index Job complete.
2012-08-22 00:00:35,865 http-8000-Processor32 ERROR tstcreateissue230 62307x782180x10 779gde http://localhost:8000/secure/AddComment.jspa [jira.issue.index.DefaultIndexManager] Wait attempt timed out - waited 30000 milliseconds com.atlassian.jira.issue.index.IndexException: Wait attempt timed out - waited 30000 milliseconds 
	at com.atlassian.jira.issue.index.DefaultIndexManager.obtain( 
	at com.atlassian.jira.issue.index.DefaultIndexManager.await( 
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues( 
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssues( 
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexIssueObjects( 
	at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source) 
	at sun.reflect.DelegatingMethodAccessorImpl.invoke( 
	at java.lang.reflect.Method.invoke( 
	at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke( 
	at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke( 
	at $Proxy63.reIndexIssueObjects(Unknown Source) 
	at com.atlassian.jira.event.issue.AbstractIssueEventListener.workflowEvent( 
	at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent( 
	at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent( 
	at com.atlassian.jira.web.action.issue.AddComment.alertSystemOfComment( 
	at com.atlassian.jira.web.action.issue.AddComment.doExecute( 
	at webwork.action.ActionSupport.execute( 


The index optimization job can cause JIRA operations, such as HTTP threads to timeout if they occur whilst the job is running as the indexes are locked. This is currently being tracked here:  JRA-19145 - Getting issue details... STATUS . It will also cause additional problems with  JRA-29587 - Getting issue details... STATUS .


tip/resting Created with Sketch.

This can also be caused by slow disk speed, please our Testing Disk Access Speed KB and test to see if the disk is causing problems first. If the disk speed is acceptable, this can be resolved by disabling the Index Optimization job.

  1. Add the following lines to <JIRA-HOME>/
  2. (This step is for JIRA 5.0 to 5.1.5 only): Remove the entry for OptimizeIndexes job from <JIRA-install>/atlassian-jira/WEB-INF/classes/scheduler-config.xml:

            <trigger name="OptimizeIndexesTrigger" job="OptimizeIndexes" type="cron">
                <expression>0 0 0 * * ?</expression><!-- run at midnight -->
    tip/resting Created with Sketch.

    This job is required in versions of JIRA prior to 5.0, and should only be removed for JIRA 5.0 and later.

    As of JIRA 5.1.6, this was removed (see  JRA-29487 - Getting issue details... STATUS  for further information).

  3. Restart JIRA.

Alternative Resolution

For versions of JIRA prior to 5.0, instead of disabling the Index Optimisation job we can schedule it to run another time. The scheduler configuration uses a cron expression, so to change it to 19:00 every day:

  1. Modify the  <JIRA-install>/atlassian-jira/WEB-INF/classes/scheduler-config.xml to below:

            <trigger name="OptimizeIndexesTrigger" job="OptimizeIndexes" type="cron">
                <expression>0 0 19 * * ?</expression><!-- run at 19:00 every day-->
  2. Restart JIRA.
Last modified on Nov 12, 2018

Was this helpful?

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