I am using MySQL, and after a while Confluence stops working with database errors.
MySQL's JDBC drivers have an annoying default behaviour where if a connection is idle for a certain amount of time (by default, eight hours), it is closed. Since Confluence uses a connection pool, this means that pooled connections die if they are not used within a certain time period.
The solution is to append ?autoReconnect=true
to the end of your database's JDBC URL.
- JNDI データソースを使用している場合、アプリケーション サーバーの設定ファイルでこれを行います。
- If you have configured Confluence to access the database directly, you will need to manually edit the
hibernate.connection.url
property in the confluence.cfg.xml
file in your confluence.home
directory. After you have changed the URL in this file, restart Confluence.
In Confluence versions 1.0RC5 and before, there was a bug that manifested when you used Confluence to connect directly to a MySQL database instead of going through a datasource configured in the application-server under which Confluence runs. Unfortunately the symptoms of the bug were identical to the much more common problem above, so it took us a little longer to find the problem than we should have.
So long as you specify autoReconnect=true, Confluence 1.0RC6 and later should remain connected to your MySQL database indefinitely.
Configuration Guide
FAQ Home