I am using camunda docker version (image - camunda/camunda-bpm-platform:latest) and mysql as the process engine db. Getting persistence exception sometimes in camunda log.
I found from the forum that these 2 below parameters need to be added in server.xml file of tomcat.
testOnBorrow=“true”;
validationQuery=“SELECT 1”;
so, my understanding is – the updated server.xml of tomcat should look like below.
I executed the below command-
docker run -d --name camunda -p 8080:8080 --link mysql
-e DB_DRIVER= com.mysql.jdbc.Driver
-e DB_URL= jdbc:mysql://test-mysql002:3306/processengine?autoReconnect=true
-e DB_USERNAME=camunda
-e DB_PASSWORD=camunda
-e WAIT_FOR= test-mysql002:3306
-e DB_VALIDATE_ON_BORROW=true
-e DB_VALIDATION_QUERY=SELECT 1
camunda/camunda-bpm-platform:latest
And found the updated server.xml as below –
<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://test-mysql002:3306/processengine?autoReconnect=true” defaultTransactionIsolation=“READ_COMMITTED” username=“camunda” password=“camunda” maxActive=“20” minIdle=“5” maxIdle=“20”/ >
I could not find testOnBorrow and validationQuery attribute here.
Please suggest what steps exactly need to follow for this. Or I am doing anything wrong.
Thanks