In the apache log where the mouse is running always has this database connection error, I am using MySql, but the application is working fine, but these errors in the log bother me. Here are some of them:
Caused by: org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit.
Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException:
Caused by: java.net.SocketException: Broken pipe (Write failed)
Cause: org.apache.ibatis.transaction.TransactionException: Error configuring AutoCommit. Your driver may not support getAutoCommit() or setAutoCommit(). Requested setting: false. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException:
@MarceloCP , Are you using tomcat connection pool?
Configure these properties testOnBorrow
, validationQuery
and validationInterval
.
DB_VALIDATE_ON_BORROW = true
transaction-isolation = READ-COMMITTED
Refer these settings:
<Resource name="jdbc/ProcessEngine"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="process-engine"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://XXXX:3306/camunda?autoReconnect=true"
username="XXXX"
password="XXXX"
maxActive="20"
minIdle="10"
testWhileIdle="true"
testOnBorrow="true"
testOnReturn="false"
validationQuery="SELECT 1"
validationInterval="30000"
timeBetweenEvictionRunsMillis="30000"
maxWait="10000"
removeAbandonedTimeout="60"
removeAbandoned="true"
logAbandoned="true"
minEvictableIdleTimeMillis="30000"
connectionTimeout="300000"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;
org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;
org.apache.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer" />
We had several issues with MySQL connection. Our final stable configuration for the resource is given bellow. As already mentioned above we had added testOnBorrow, validationQuery and validationInterval. But the other issue has appeared which has been fixed with jdbcInterceptors.
<Resource name="jdbc/ProcessEngine"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="process-engine"
…
opened 09:31PM - 16 Feb 20 UTC
closed 07:52AM - 17 Feb 20 UTC
Hi.
I'm trying to use MariaDB (by including the MariaDB client jar, and setting the jdbc url accordingly) and its been good...
http://burtsev.net/en/2012/01/12/100/