Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async executor keeps acquiring jobs even after removal #4021

Open
despoina-kaz opened this issue Jan 30, 2025 · 0 comments
Open

Async executor keeps acquiring jobs even after removal #4021

despoina-kaz opened this issue Jan 30, 2025 · 0 comments

Comments

@despoina-kaz
Copy link

despoina-kaz commented Jan 30, 2025

Describe the bug
We use flowable in an embedded scenario within a spring boot application. We have a multi-tenant environment where each tenant has its own schema and by rabbit listener we add/delete tenant. The tenant is successfully deleted (please check code below) but then there are logs that keep searching for async jobs to run.

Expected behavior
Async jobs stop to run

Logs
"exception for engine bpmn during async job acquisition: \n### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation \"act_ru_job\" does not exist\n Position: 30\n### The error may exist in org/flowable/job/service/db/mapping/entity/Job.xml\n### The error may involve org.flowable.job.service.impl.persistence.entity.JobEntityImpl.selectJobsToExecute-Inline\n### The error occurred while setting parameters\n### SQL: SELECT RES.* from ACT_RU_JOB RES WHERE SCOPE_TYPE_ is null and LOCK_EXP_TIME_ is null order by RES.ID_ asc LIMIT ? OFFSET ?\n### Cause: org.postgresql.util.PSQLException: ERROR: relation \"act_ru_job\" does not exist\n Position:

Code
ExecutorPerTenantAsyncExecutor asyncExecutor = (ExecutorPerTenantAsyncExecutor) processEngineConfiguration.getAsyncExecutor(); asyncExecutor.removeTenantAsyncExecutor(tenantId); ((TenantAwareDataSource) processEngineConfiguration.getDataSource()).removeDataSource(tenantId);

Additional context
Flowable version: 7.1.0
Database: Postgres
Spring boot app
AWS cluster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant