If the query time of the database is too long and your application shows no response, you can configure the database for query time-outs. By default, confluence does not have a time-out.To Configure the database query time-out, do the following on your test server:
1. Close the confluence.
2. confluence-x.x.x.jar
extract the files from the file databaseSubsystemContext.xml
. This file is confluence/WEB-INF/lib/
copied to the directory at the same time confluence/WEB-INF/classes/
.
3. Edit the confluence/WEB-INF/classes/databaseSubsystemContext.xml
file and add the DefaultTimeout attribute to the "TransactionManager" Bean:
<bean id=
"tenantedTransactionManager" class
=
"org.springframework.orm.hibernate.HibernateTransactionManager" plugin:available=
"true"
>
<property name=
"sessionFactory" ref=
"sessionFactory"
/>
<property name=
"defaultTimeout" value=
"120"
/>
</bean>
|
The time-out is the default unit of seconds, and when the query time exceeds the set time, the query is forced to terminate. In some cases confluence does not catch this error and you will probably see the error message interface in confluence.
4. Restart the confluence.
Once the query time-out is working on your test server, you can integrate this configuration into your production server.
When you upgrade the confluence, you need to repeat the above actions. At the same time, databaseSubsystemContext.xml
the file may be modified depending on the version.
Https://www.cwiki.us/display/CONFLUENCEWIKI/Configuring+database+query+timeout
Confluence 6 Configuration database query time-out