Skip to content
FeaturesPricingAffiliateBlogHelpAboutContact
Get StartedSign In
Back to Blog
industry2026-05-2310 min read

Our Workers AI bill jumped 12× in a week — feedback-sentiment cron was hammering LLaMA on the same 50 rows 48 times per day (poison-pill loop)

Vesna (31), AI infrastructure ops engineer at thMenu's Sofia office, sees the Cloudflare billing dashboard show Workers AI inference spend up 12× over 7 days ($42 → $508). Forensic: `feedback-sentiment` cron was re-processing 47 poison-pill rows (Bulgarian Cyrillic + Welsh + Maltese + prompt-injection attempts) every 30-min tick — `analyzed_at = NULL` stayed because the caller only stamped on SUCCESS, not on null-return + thrown errors. 47 × 48 × 7 = ~15,800 wasted inferences/week. **PR #639 batch IV F4** fix: stamp `analyzed_at` on parse-failure and thrown-error branches too (neutral/0-confidence/empty-summary defaults). The cron walks past forever. Best-effort `.catch()` — D1 outage doesn't fail the whole batch. Pattern: at-least-once cron + WHERE `processed_at IS NULL` filter = both success AND failure paths MUST stamp. Vesna shipped a CI lint rule; pattern added to team onboarding doc.

th

thMenu Team

thmenu.com

Found this helpful? Share it.