Backend workflow delay - Taking several minutes to run after deleting an invoice

Hi everyone,

I think I’ve finally identified the root cause of a strange problem that’s been affecting my ERP app — it’s simple but with huge implications.

Here’s the situation:

  • When a user creates an invoice, it’s linked to several equipment records.

  • If the user later deletes (or cancels) that invoice, a backend workflow runs to update those related records — basically marking them as “canceled” and changing their “billed until” date.

  • The issue is that users often need to create a new invoice immediately after cancelling the old one, and the “billed until” date from the previous invoice must be updated first to avoid inconsistencies.

The problem: the backend workflow that updates those records is sometimes taking several minutes to execute. During that delay, the system still shows the wrong data (since it’s waiting for the backend workflow to finish), which causes a lot of issues in other parts of the ERP.

I understand backend workflows are supposed to run immediately for just a few items (~10 iterations) — Bubble itself recommends using them to offload processing from the front end — but in practice it seems they can have a noticeable delay, even for small workloads.

:backhand_index_pointing_right: Has anyone else experienced this kind of delay in backend workflows?
Is there any known reason why a backend workflow that should run instantly sometimes takes minutes to execute?

This behavior is critical because it breaks some business logic that depends on the updated data being available right after the cancellation.

Any insight, workaround, or performance tip would be greatly appreciated!

Taking 1 minutes is huge, how many Item is the backend workflwo updating ? … are you usign iteration on backend workflow, use make changes on list this can be faster.

and if you like i take take a look at you app, to give you a better solutoin for free

How long would these “several minutes” be?

Is this delete or cancel by the user inside the app? Within this same action, do you call the API workflow?

Could you explain your flow a bit better? How is your API workflow triggered?

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.