Guys, maybe iv done something wrong
I have created and ran some workflows which were fetching data from an API and storing in the DB
Over the space of 2 hours, I blew through 1.2 Million WU’s - which was only 11 000 DB entries
WTF happened? Is this supposed to be how it works?
I think my issue might be that, when I ran the workflows, I have set them to “…Public API”, will this make such a big difference?
If this is the actual cost of 11 000 records, how the hell does anyone have a working, SaaS grade app?
Please assist
Don’y you have a looping backend WF which keeps on rescheduling without conditions to complete?
1 Like
Are you sure you didn’t accidentally set a never ending recurring workflow? Go to ‘Scheduler’, ‘pause all tasks’ and see if there’s anything there. If yes, cancel it and contact Bubble support so they’ll refund the WUs…
But normally if I’m doing a bulk data operation involving the API I’d be looking at 5-10 WUs per entry - 100,000 WUs sure but if you’ve used 1.1 mil something else is off or you’ve poorly configured your workflows so you have lots of high WU actions.
1 Like
I am intending on creating some recursivness - so that the data source, and my App is always in sync
I had created another such workflow, but did not land up eating through as much WU units as the one I reference
Could it be anything to do with the fact that I set it to “Expose as Public API”
What re-scheduling conditions do you have?
Not for Bubble
Don’t think so…
How often do your receive a POST from other services? And what you do after this POST?
1 Like
The post was an error
I do not need it to be doing any posting …
it will loop till pages are complete,
Then it will check again every 5 mins
It will only create new orders based on weather the qty has changed in that 5 mins
It’s hard to investigate without any screenshots of your WF setup
@dhalpern6 you should go to Logs - App Metrics - and drill down on which workflow was responsible for this and on logs you can see how many WU that workflow is using per run.
3 Likes
Hey there
Yeah, I did check the logs, one of the workflows was using around 211 units per run
But it is so out of place, because I have another workflow (doing basically the same thing), which was not using even close to that amount of WU
I am now afraid to try turn them on again, lest I cost myself another $350 every 2 hours
Can you show us the actions in the workflow? 211 WUs is obscene
1 Like
And how many AllTransactions do you have in your database?
After running this action on 3 users, I have 11 000 in total
Is there a reason you haven’t used
Search for AllTransactions:first item is empty
Constraint:
transaction_log_id doesn’t contain trans_log_id
2 Likes
I dont have a specific reason, but I also dont know what the difference is between that and what I have done…
This constraint is basically just to make sure I dont land up with duplicate data in my DB…
Okay, well if you have 11,000 items, the last time that workflow ran:
It searched for 11,000 items
It returned 11,000 items from the database at 0.015 WU each = 165 WUs (because you said :each item) and the WUs for each character of data from the database.
This is like getting all of the transactions and checking through each one by hand to check the condition.
What you should have done is this:
That’s just 0.2 WUs for an aggregate query (and maybe 0.3 WU too for it being a search, I’m not too sure but the point is it’s tiny)
This is more like asking someone else (Bubble) to pass you all of the transactions that fulfil the condition, and you know if they give you no items that none of them fulfil that condition. Much quicker than checking all of them yourself.