Stuck on RepositoryService.deleteDeployment("xxx", true)

Dear Sir,

Need a help if you can, please help me.
I am using Flowable 6.4.1, and my application will be stuck when calling repositoryService.deleteDeployment(“xxxxxx”, true)。

Did not see any log messages on terminal. Does anyone can help me or give some hints?

Here are logs from Flowable.

Thanks.

Hi,

2019-09-26 15:58:25.539 DEBUG 30987 --- [nio-8080-exec-1] o.f.c.e.impl.interceptor.LogInterceptor  : --- starting DeleteDeploymentCmd --------------------------------------------------------

is started but I did not find when it has finished. The problem could be that

2019-09-26 16:01:41.766 DEBUG 30987 --- [nio-8080-exec-1] ocessInstanceIdsBySuperProcessInstanceId : ==>  Preparing: select * from ACT_HI_PROCINST where SUPER_PROCESS_INSTANCE_ID_ = ? 
2019-09-26 16:01:41.766 DEBUG 30987 --- [nio-8080-exec-1] ocessInstanceIdsBySuperProcessInstanceId : ==> Parameters: 0c3e9982-cb72-11e9-8db7-0242ac0f3512(String)

is still trying to find HI_PROCINST. Could you find out why there are so many history queries?

Regards
Martin

Hi,

Yes, you are right. It has never finished until now. This action is running over 3 hours, and it keeps running.

What do you mean ‘history queries’? In our test, we will run a client application and keep running a test flow and query the flow result. Is that the answer for your question?

Could you reproduce the issue in the jUnit test?

Regards
Martin

Hi,

No. Sorry. I just have a copied database and can reproduce this issue with that.
Can this be helpful?

I would expect that problem is in the the data (or in the query). Could you find out what is causing the issue? I would expect some kind of select in the historic data.

Regards
Martin

I can tell you my test procedure. I run an application which will call the following APIs periodically.

Loop:
POST /process-api/runtime/process-instances
=> Body {processDefinitionKey: ‘demo-user-list’, variables: []}
GET /process-api/history/historic-process-instances/{processInstanceId}
GET /process-api/history/historic-variable-instances?processInstanceId={processInstanceId}

Keep running these for a long time, and finally this issue will happen. In my case, the total number of the process instances is 58,766.

Actually, I think this is a performance issue about deleting deployment. Maybe it can be solved by enhancing SQL manipulating. I also uploaded my database at here, https://drive.google.com/file/d/1_KJa4UYGOhHSTEJqwIQF_1lkakh2pWJz/view?usp=sharing . It’s mysql database, and the username and password are both ‘flowable’.

Hope this can help to fix this issue.
Thanks.