Adding transaction listener wait around 5 mins to start next task

here is the loan provising process task" call recharge system" actually end with calling start new process in transaction context listener

Context.getTransactionContext().addTransactionListener(TransactionState.COMMITTED, commandContext -> {

the time take for transaction listner to finish around 5 mins can you please advise why this take a long time?
please note when we remove line transction commited listener it took normal time without waiting 5 mins
Some other notes
we disable history saving
and we are using postgress db with the following data source parameters


Hey @gihan,

What are you doing in processService.startLoanProvisioningProcess(processMessage);? That is taking a lot of time to finish. This seems like your own piece of code. Doing it in TransactionState.COMMITTED is still doing it synchronous, but after the transaction has committed.


Hi @filiphr
Thanks alot for your reply
it start other async small proccess
runtimeService.startProcessInstanceByKey(mnoCode,"loanProvisioning- "+loanProvisioningTrigger.getLoanTriggerRequestId(),processVariables);

i think it get timeout for async task and then start to execute the small proccess

startProcessInstanceByKey is not async. Is your first service task async?

yes it the service tasks inside the proccess itself is asyn