In jira-application.properties, we say that JIRA should wait at most 30s to an index lock before giving up:
For an average size JIRA (33k issues) on average hardware, JIRA's nightly index optimization takes 48s. On the ASF JIRA, 75k issues takes 208s. If any write operation takes place during this time it will fail.
Clearly, 30s hangs are not outside the bounds of possibility. Could we increase this to 300s or something?