Postgresql Camunda驾驶舱和Rest API关闭,但应用程序启动/作业执行器配置
我们的Camunda Orchestrator面临重大事故。当我们访问100个正在运行的流程实例时,Camunda驾驶舱需要花费很长时间,而且从未响应。 我们在调用/app/engine/时遇到同样的问题。 从RabbitMQ中消耗的消息很少,然后一切都停止了 然而,应用程序没有关闭。 我怀疑流程引擎配置有问题,因为无法获取作业执行器日志 当我将JobExecutorActivate设置为false时,驾驶舱和队列消耗的所有情况都正常,但进程在第一个子进程结束时停止 我们有一个不间断的日志循环:Postgresql Camunda驾驶舱和Rest API关闭,但应用程序启动/作业执行器配置,postgresql,spring-boot,rabbitmq,activiti,camunda,Postgresql,Spring Boot,Rabbitmq,Activiti,Camunda,我们的Camunda Orchestrator面临重大事故。当我们访问100个正在运行的流程实例时,Camunda驾驶舱需要花费很长时间,而且从未响应。 我们在调用/app/engine/时遇到同样的问题。 从RabbitMQ中消耗的消息很少,然后一切都停止了 然而,应用程序没有关闭。 我怀疑流程引擎配置有问题,因为无法获取作业执行器日志 当我将JobExecutorActivate设置为false时,驾驶舱和队列消耗的所有情况都正常,但进程在第一个子进程结束时停止 我们有一个不间断的日志循环:
2018/11/17 14:47:33.258 DEBUG ENGINE-14012 Job acquisition thread woke up
2018/11/17 14:47:33.258 DEBUG ENGINE-14022 Acquired 0 jobs for process engine 'default': []
2018/11/17 14:47:33.258 DEBUG ENGINE-14023 Execute jobs for process engine 'default': [8338]
2018/11/17 14:47:33.258 DEBUG ENGINE-14023 Execute jobs for process engine 'default': [8217]
2018/11/17 14:47:33.258 DEBUG ENGINE-14023 Execute jobs for process engine 'default': [8256]
2018/11/17 14:47:33.258 DEBUG ENGINE-14011 Job acquisition thread sleeping for 100 millis
2018/11/17 14:47:33.359 DEBUG ENGINE-14012 Job acquisition thread woke up
以及此日志(用于队列消耗):
环境:
Spring Boot 2.0.3.RELEASE,Camunda v7.9.0和PostgreSQL,RabbitMQ
Camunda BPM侦听并推送到165RabbitMQ队列
配置:
# Data source (PostgreSql)
com.campDo.fr.camunda.datasource.url=jdbc:postgresql://localhost:5432/campDo
com.campDo.fr.camunda.datasource.username=campDo
com.campDo.fr.camunda.datasource.password=password
com.campDo.fr.camunda.datasource.driver-class-name=org.postgresql.Driver
com.campDo.fr.camunda.bpm.database.jdbc-batch-processing=false
oms.camunda.retry.timer=1
oms.camunda.retry.nb-max=2
SpringProcessEngine配置:
@Bean
public SpringProcessEngineConfiguration processEngineConfiguration() throws IOException {
final SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setDataSource(camundaDataSource);
config.setDatabaseSchemaUpdate("true");
config.setTransactionManager(transactionManager());
config.setHistory("audit");
config.setJobExecutorActivate(true);
config.setMetricsEnabled(false);
final Resource[] resources = resourceLoader.getResources(CLASSPATH_ALL_URL_PREFIX + "/processes/*.bpmn");
config.setDeploymentResources(resources);
return config;
}
Pom依赖项:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>
感谢您的帮助。首先:如果您的流程包含异步步骤(作业),那么它将暂停。激活jobExecutor只会说camunda应该管理这些作业的工作方式。如果禁用执行器,您的进程仍将停止,因为没有人执行它们,所以它们将保持停止状态。 禁用作业执行仅在测试期间或当您有多个节点且只有其中一些节点应进行处理时才是明智的 主要问题:作业执行器使用线程池。从您描述的情况来看,池中的所有线程很可能永远阻塞,因此它们永远不会完成,也永远不会返回,这意味着您的系统被卡住了 这发生在我们不久前使用smtp服务器时,连接上存在无限超时,因此线程一直在等待,尽管机器不可用 由于卡蒙达的工作执行本身是高度可靠和经过良好测试的,我建议您仔细检查您在代表中所做的一切,如果您幸运(我是对的),您将找到您永远等待的地方
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>
config.setJobExecutorActivate(false);