Camunda processing (service task) very slow

We use a Camunda process which is unfortunately very slow.
Probably something was configured incorrectly here.

We have already changed some parameters, but this does not solve the problem.

We use about 15 service tasks in one workflow. (When the service task is triggered, the processing of the script takes a few milliseconds).
Sometimes one workflow is triggered several times.

The processing time per part it is quite fast one after the other.

With these 15 ServiceTasks it takes partly between 5-15 minutes for one run.

It everytime stuck on a Service Task for 1-2 Minutes and nothing happen.

image

This is how the ServiceTask was stored in NodeJS:

const { Client, logger } = require("camunda-external-task-client-js");
const { Variables } = require("camunda-external-task-client-js");
const { XMLHttpRequest } = require("xmlhttprequest");

const config = { baseUrl: "http://localhost:8080/engine-rest", interval: 1, autoPoll: true, use: logger };

const client = new Client(config);

// susbscribe to the topic: 'creditScoreChecker'
client.subscribe("mailGateway", async function({ task, taskService }) {
  // Put your business logic
try {

// MY CODE IS HERE

	taskService.complete(task, processVariables);

} catch (ex) {
	console.log(ex);
}

});

Die Proccess Engine (/opt/camunda/server/apache-tomcat/conf/bpm-platform.xml):

<?xml version="1.0" encoding="UTF-8"?>
<bpm-platform xmlns="http://www.camunda.org/schema/1.0/BpmPlatform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.camunda.org/schema/1.0/BpmPlatform http://www.camunda.org/schema/1.0/BpmPlatform ">

<job-executor>
    <job-acquisition name="default" />
  </job-executor>

  <process-engine name="default">
    <job-acquisition>default</job-acquisition>
    <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
    <datasource>java:jdbc/ProcessEngine</datasource>

    <properties>
      <property name="history">full</property>
      <property name="databaseSchemaUpdate">true</property>
      <property name="authorizationEnabled">true</property>
      <property name="jobExecutorDeploymentAware">true</property>
      <property name="historyCleanupBatchWindowStartTime">00:01</property>
    </properties>



<plugins>
      <!-- plugin enabling Process Application event listener support -->
      <plugin>
        <class>org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin</class>
      </plugin>

      <!-- plugin enabling integration of camunda Spin -->
      <plugin>
        <class>org.camunda.spin.plugin.impl.SpinProcessEnginePlugin</class>
      </plugin>

      <!-- plugin enabling connect support -->
      <plugin>
        <class>org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin</class>
      </plugin>
</plugins>


  </process-engine>

</bpm-platform>

Is there anyone who can help with this problem? Do you need more files to reproduce / provide the error?

Did anyone know something?

Have you tried using long polling?
You can do that by setting a time on the client with the asyncResponseTimeoutproperty
More details are here in the readme

1 Like