Hi all,
I am following KIE Spring Boot sample application:
All I have changed is the Spring application.properties to use MySQL (full property file pasted below).
I am running MySQL database locally: https://hub.docker.com/_/mysql/
$ docker run --name mysql -e MYSQL_ROOT_PASSWORD=password -d -p 3306:3306 mysql:5.7
My test process is very simple, Start -> AsyncWorkItemHandler -> End. However, every time I start a new process instance via REST API... 4 database connections are opened on MySQL and those connections are not being closed.
While performance testing several connections become opened over time, so I eventually hit MySQL connection limit and get the following error:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"
It appears that a database connection pool is not being used. Am I missing some configuration here? Maybe some configuration for Narayana? Any help appreciated!
Thanks.
Here is application.properties I am using:
#
# https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#common-application-properties
#
#server configuration
server.address=localhost
server.port=8090
#jbpm configuration
jbpm.executor.enabled=true
#jbpm.executor.retries=5
#jbpm.executor.interval=0
#jbpm.executor.threadPoolSize=1
#jbpm.executor.timeUnit=SECONDS
kieserver.restContextPath=/rest
kieserver.location=http://${server.address}:${server.port}${kieserver.restContextPath}/server
#kieserver.controllers=
kieserver.drools.enabled=true
kieserver.dmn.enabled=true
kieserver.jbpm.enabled=true
kieserver.jbpmui.enabled=true
kieserver.casemgmt.enabled=true
kieserver.optaplanner.enabled=true
# only required for jBPM
#data source configuration
spring.datasource.username=root
spring.datasource.password=password
spring.datasource.url=jdbc:mysql://localhost/jbpm
spring.datasource.driver-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
spring.datasource.type=org.apache.tomcat.jdbc.pool.XADataSource
#hibernate configuration
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.properties.hibernate.id.new_generator_mappings: false
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
#transaction manager configuration
spring.jta.narayana.transaction-manager-id=1
--
You received this message because you are subscribed to the Google Groups "jBPM Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-developme...@googlegroups.com.
To post to this group, send email to jbpm-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-development/793211df-05ab-4bc1-9486-439acd159d57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On 22 Jul 2018, at 17:35, JB <josh...@gmail.com> wrote: