If database queries are taking too long to perform, and your application is becoming unresponsive, you can configure a timeout for database queries. There is no default timeout in Confluence.

To configure a database query timeout, do the following on your test server:

1. Confluence をシャットダウンします。

2. confluence/WEB-INF/lib/ にある confluence-x.x.x.jar から databaseSubsystemContext.xml を抽出して、コピーを confluence/WEB-INF/classes/ に保存します。

3. confluence/WEB-INF/classes/databaseSubsystemContext.xml を編集し、defaultTimeout プロパティを "transactionManager" Bean に追加します。

<bean id="transactionManager" class="org.springframework.orm.hibernate.HibernateTransactionManager">
    <property name="sessionFactory">
        <ref bean="sessionFactory"/>
    </property>
    <property name="defaultTimeout" value="120"/>
</bean>

タイムアウトは秒単位で測定され、この時間を超過するクエリは強制的に中止されます。場合によっては、これらのエラーが Confluence によりうまく処理されず、Confluence エラーページが表示されることがあります。

4. Confluence を起動します。

テスト環境でタイムアウトが適切に機能したら、設定変更を Confluence に移行します。

(warning) You will need to reapply these changes when upgrading Confluence, as the original databaseSubsystemContext.xml file changes from version to version.

  • ラベルなし