Confluence with JNDI Connector Crashes Under Heavy Load Due to Database Connection Issues
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
Confluence frequently crashes under heavy load when using a JNDI connector and the Tomcat 8 connection pool
atlassian-confluence
に次のメッセージが出力される。.log
2015-11-24 15:38:32,626 ERROR [ContainerBackgroundProcessor[StandardEngine[Standalone]]] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Cannot get a connection, general error
2015-11-24 15:39:20,591 WARN [localhost-startStop-1] [tomcat.dbcp.dbcp2.BasicDataSourceFactory] log Name = confluence Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "15" for "maxActive" property, which is being ignored.
診断
環境
- Confluence 5.8 or above
- Tomcat 8 or above
JNDI connection is being used in
server.xml
withmaxActive
<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ... maxActive="30" ... />
原因
In Tomcat 8 the syntax for the connection pool has changed from using MaxActive
to MaxTotal
and the default value is 8. This can cause database connection issues.
ソリューション
In conf/server.xml
change maxActive
to maxTotal
<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
...
maxTotal="30"
...
/>
See Configuring a MySQL Datasource in Apache Tomcat for an example.