Camunda form loading time

Hi,
I’m encountering a critical issue with my Spring Boot application after restarting it. The Camunda form at http://localhost:6095/engine-rest/engine/microworkflow/task/4352720/deployed-form is taking nearly 4 minutes to load variables, and logs indicate a communication link failure:

error:
Caused by: org.apache.ibatis.exceptions.PersistenceException:

Error getting a new connection. Cause: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

Cause: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

The form eventually loads and displays variables after the error.
Subsequent(from 2nd call onwards) form loads are fast (under 10 seconds).
to solve this connection issue i have added min/max DB connection preperties in camunda.cfg.xml file.

Configuration:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">
	<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
		<property name="processEngineName" value="microworkflow"/>
		<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/VFP_ROM_PP?autoReconnect=true"/>
		<property name="jdbcDriver" value="com.mysql.cj.jdbc.Driver"/>
		<property name="jdbcMaxCheckoutTime" value="20000"/>
		<property name="jdbcMaxWaitTime" value="20000"/>
		<property name="jdbcMaxIdleConnections" value="30"/>
		<property name="jdbcMaxActiveConnections" value="40"/>
		<property name="jdbcUsername" value="userName"/>
		<property name="jdbcPassword" value="password"/>
		<property name="history" value="none"/>
		<property name="databaseSchemaUpdate" value="true"/>
		<property name="jobExecutorActivate" value="true"/>
	</bean>
</beans>


The issue persists even after adding min/max DB connection properties to camunda.cfg.xml.
Please assist me in resolving this connection issue urgently. It’s significantly impacting application performance.

What’s your version for

  1. Camunda
  2. JDK
  3. MySQL Connector
  4. MySQL version.

If you are trying to use latest version of MySQL and Connector,but not tested you may run into issues.

Hi @cpbpm

  1. Camunda camunda-engine-7.16.0
  2. JDK 11
  3. MySQL Connector 8.0.26
  4. MySQL version.

please do include MySQL verion details and you are using CE or EE