gpt4 book ai didi

spring - JMeter性能测试下出现Activiti死锁

转载 作者:行者123 更新时间:2023-12-01 15:30:11 26 4
gpt4 key购买 nike

我有问题 事件并发 .我们有一个 wicket Spring 应用 嵌入式 Activiti 工作流引擎 .它在没有并发用户的情况下工作正常,但在 期间jmeter 性能测试 事件 造成死锁 在自己的 table 上。例如:ACT_RU_JOB、ACT_RU_EXECUTION、ACT_RU_VARIABLE。我在 Activiti 论坛上找到了有关此问题的主题 ( Activiti Forum )。他们建议使用队列来启动 activiti 进程。这个解决方案并没有解决问题,因为死锁仍然发生。我为您提供了一些配置和堆栈跟踪。所有的答案都对我有用。谢谢您的帮助!

我的事件配置:

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<property name="databaseType" value="mssql" />
<property name="dataSource" ref="dataSource" />
<property name="transactionManager" ref="transactionManagerLugy" />
<property name="databaseSchemaUpdate" value="true" />
<property name="jobExecutorActivate" value="true" />
<property name="deploymentResources" value="classpath*:/diagrams/idm/*.bpmn20.xml" />
<property name="history" value="none"/>
<property name="jdbcMaxActiveConnections" value="1000"/>
<property name="jdbcMaxIdleConnections" value="10"/>
<property name="jdbcMaxWaitTime" value="50000"/>
</bean>


<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>

堆栈跟踪:
### Error querying database.  Cause: org.hibernate.exception.LockAcquisitionException: Transaction (Process ID 67) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.selectVariablesByExecutionId-Inline
### The error occurred while setting parameters
### Cause: org.hibernate.exception.LockAcquisitionException: Transaction (Process ID 67) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:471)
at org.springframework.jms.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:355)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:535)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:495)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
at java.lang.Thread.run(Thread.java:662)

最佳答案

我从事件图中删除了所有计时器,死锁消失了。我不知道为什么,但它有效。

关于spring - JMeter性能测试下出现Activiti死锁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6662504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com