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.
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!