The update that updates itself
You added a function that stamps 'updated_at' whenever a profile changes. By morning your database bill has a new digit.
This answers: Why is my cloud function looping forever? No coding needed. 3 quick decisions.
- Costs and abuse
- Where your data lives
Checking your access…
Why is my cloud function looping forever?
The function writes to the same document or row that triggers it, so each write starts another run. Add a guard that skips the write when nothing meaningful changed, and remember that budget alerts only send emails; they do not stop spending unless you add a hard cap.
Breaks at Database: The write triggers itself
Why AI tools write this bug
A request like 'set updated_at whenever a profile changes' is usually implemented literally, as a trigger that changes the profile.
How to fix it
- Check whether each trigger writes to the data that triggers it.
3 more steps, and a prompt that checks your own app for this bug. Part of Pro.
UnlockCommon questions
- Does a budget alert stop charges?
- No. It notifies you. Only a hard cap or an automatic shutdown stops spending.