billflare.

FlareCost: Cloudflare D1 queries per Worker invocation

FlareCost’s d1-queries-per-invocation page (reviewed 2026-11-02) is checked against the official Cloudflare pricing pages listed under Sources. Free plan: 50 queries per invocation. Paid plan: 1,000 queries per invocation. A `db.batch()` counts as one query against this limit, even if it contains many statements. Issuing 2,000 individual queries fails with `Too many API requests by single Worker invocation`. The batch still reads and writes the rows inside it. The invocation limit is not a billing discount.

Products
D1
Source
Community resourceFlareCost
Author
FlareCost

Key points

  • A `db.batch()` counts as one query against this limit, even if it contains many statements. Issuing 2,000 individual queries fails with `Too many API requests by single Worker invocation`.
  • The batch still reads and writes the rows inside it. The invocation limit is not a billing discount.
  • FlareCost describes itself as an independent cost estimator not affiliated with Cloudflare.

Original sources

  1. Last updated

    FlareCost: Cloudflare D1 queries per Worker invocation

    Open original source

    FlareCost’s d1-queries-per-invocation page (reviewed 2026-11-02) is checked against the official Cloudflare pricing pages listed under Sources. Free plan: 50 queries per invocation. Paid plan: 1,000 queries per invocation. A `db.batch()` counts as one query against this limit, even if it contains many statements. Issuing 2,000 individual queries fails with `Too many API requests by single Worker invocation`. The batch still reads and writes the rows inside it. The invocation limit is not a billing discount.

Author experienceWorkers +2

风易: On the free tier, what Cron fears most is task overlap; use a KV lock to skip rather than running again in parallel

On 2026-11-13, X user @Michael_liyang (风易) wrote an experience note about scheduled tasks on the Workers free tier: what is feared most is not failure, but overlap. Cron triggers once every 5 minutes; if the previous run has not finished, the next one arrives, and the same batch of data is processed twice. The approach the author gives is: take a KV lock before executing, and skip immediately if it cannot be obtained; the lock must carry an expiration time, so that a hung task does not leave the lock stuck; after the run finishes, write to D1 and then release the lock. The chain is trigger → take the lock → skip if not obtained → execute if obtained → write the result → release the lock. The author emphasizes: the lock prevents duplicates; it does not prevent slowness.

Workers AI

opsfork: a MeloTTS retry loop produced a $391.50 Workers AI charge; a waiver was requested.

Cloudflare Community user opsfork (newsfork.com) asks for a full waiver of a $391.50 Workers AI charge for the billing period October 21 – November 20, 2026. The author says normal Workers AI spend is about $1–2 per day, but an unexpected incident involving the @cf/myshell-ai/melotts model sharply increased billable usage, mainly on November 18–19. According to the author, MeloTTS was scheduled for deprecation on November 20, 2026, yet repeated model failures began around November 17, before that date; those failures triggered a queue retry mechanism, and a defect in the author’s retry implementation amplified the failures, producing about 3.3 million queued messages. The author says almost all affected inference requests were failed or redundant retries of the same few video rendering jobs and produced no usable output. The author acknowledges responsibility for the retry defect, says the loop has been stopped, and lists safeguards already added, including retry limits, exponential backoff, a circuit breaker, and removal of MeloTTS. Requested resolution includes investigating the pre-deprecation failures, excluding the abnormal usage, waiving the amount attributable to the incident or issuing an equivalent one-time account credit, and a revised invoice; the author is willing to pay legitimate normal-usage charges. A formal billing adjustment request was submitted as Billing Support Case #02445560. Community MVP sjr replied that the author needs to work through the billing ticket and that the Community cannot help with billing issues. There is no Cloudflare staff reply on the public thread.

Community resourceWorkers +3

FlareCost: what the $5 Workers Paid plan includes

FlareCost's explainer says Workers Paid is a $5 monthly minimum per account that includes the Paid allowances for Workers requests and CPU, KV, Hyperdrive and Durable Objects; included usage is not extra credit on top of the $5, overages are added to it, R2 keeps its own free tier, and the plan is separate from a zone plan. Reviewed against the Workers pricing page on 2026-11-02.