We’re using Camunda, running in a microservices, connecting into a Docker container for persistence.
I’ve tried both MySQL and MariaDB and the performance is terrible, for example starting up against MariaDB 10.4 (running in Docker Toolbox for Windows 7) it takes 4.5 minutes to deploy 4 pretty simple assets, and a further 7 minutes to create the Process Engine.
My docker compose entry is as follows:
mariadb-camunda:
image: mariadb:10.4
container_name: mariadb-camunda
hostname: mariadb-camunda
volumes:
- mariadb_camunda_data:/var/lib/mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: camunda
MYSQL_USER: camunda
MYSQL_PASSWORD: camunda
healthcheck:
test: ["CMD-SHELL", "/usr/bin/mysql --user=camunda --password=camunda --execute=\"SHOW DATABASES;\""]
command: mysqld --skip-name-resolve
The log output from the service with the embedded process engine is as follows:
2018-12-18 09:31:17.079 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.spring.boot : STARTER-SB021 Auto-Deploying resources: [file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-bre-api\target\classes\workflow\Pessimistic_Lock.bpmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Bearer_Management.cmmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Build_Comms_Service.cmmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Comms_Service_Creation.bpmn]]
2018-12-18 09:35:38.775 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'history' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.history.sql'
2018-12-18 09:37:26.612 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'identity' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.identity.sql'
2018-12-18 09:40:14.875 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.case.engine.sql'
2018-12-18 09:40:55.507 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.history' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.case.history.sql'
2018-12-18 09:41:31.686 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.decision.engine.sql'
2018-12-18 09:42:35.440 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.history' with resource 'org/camunda/bpm/engine/db/create/activiti.mariadb.create.decision.history.sql'
2018-12-18 09:42:35.543 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03067 No history level property found in database
2018-12-18 09:42:35.543 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03065 Creating historyLevel property in database for level: HistoryLevelFull(name=full, id=3)
2018-12-18 09:42:36.393 INFO [workflow-mgmt,,,] 12992 --- [ost-startStop-1] org.camunda.bpm.engine : ENGINE-00001 Process Engine default created.
I appreciate this is more of a Docker (Toolbox) type question but wondered if anyone else is running in a similar fashion and has experienced, and even better resolved, this issue?
For info, when I run it on Docker for Mac at home I don’t see the same issues. I found a web page where they suggested running mysqld with the “–skip-name-resolve” parameter but this doesn’t help.
Thanks Steve
UPDATE:
For info, Postgres is faster but still takes 2 minutes first time around (after that it’s quick)
2018-12-18 11:46:47.571 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.spring.boot : STARTER-SB021 Auto-Deploying resources: [file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-bre-api\target\classes\workflow\Pessimistic_Lock.bpmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Bearer_Management.cmmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Build_Comms_Service.cmmn], file [C:\Dev\SmartDeploy\smartdeploy-evo-cc\cc-workflow-mgmt\target\classes\processes\Comms_Service_Creation.bpmn]]
2018-12-18 11:47:31.374 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'engine' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.engine.sql'
2018-12-18 11:48:05.154 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'history' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.history.sql'
2018-12-18 11:48:11.635 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'identity' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.identity.sql'
2018-12-18 11:48:27.333 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.case.engine.sql'
2018-12-18 11:48:31.113 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'case.history' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.case.history.sql'
2018-12-18 11:48:34.082 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.engine' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.decision.engine.sql'
2018-12-18 11:48:41.923 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03016 Performing database operation 'create' on component 'decision.history' with resource 'org/camunda/bpm/engine/db/create/activiti.postgres.create.decision.history.sql'
2018-12-18 11:48:42.234 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03067 No history level property found in database
2018-12-18 11:48:42.234 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine.persistence : ENGINE-03065 Creating historyLevel property in database for level: HistoryLevelFull(name=full, id=3)
2018-12-18 11:48:42.405 INFO [workflow-mgmt,,,] 10696 --- [ost-startStop-1] org.camunda.bpm.engine : ENGINE-00001 Process Engine default created.