Confluence with JNDI Connector Crashes Under Heavy Load Due to Database Connection Issues
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
Confluence frequently crashes under heavy load when using a JNDI connector and the Tomcat 8 connection pool
The following appears in the
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
<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
MaxTotal and the default value is 8. This can cause database connection issues.
<Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ... maxTotal="30" ... />
See Configuring a MySQL Datasource in Apache Tomcat for an example.