提供案例
billflare.

Lunora:在代码生成时指出循环会推高哪项计费的静态检查

Daniel(@_prisis_)认为 Cloudflare 账单突增通常源于循环而不是流量;他的框架 Lunora 现在在代码生成阶段(部署前)标出 count_without_index、queue_dispatch_cycle、cron_every_minute、container_long_sleep_after,并说明各自推高哪项计费。

适用产品
WorkersDurable ObjectsQueuesContainersCron Triggers
来源
社区资源𝕏
作者
Daniel(@_prisis_)

要点

  • Lunora 是部署在用户自己 Cloudflare 账号上的后端框架(Workers、Durable Objects、D1、R2、Queues),目前为 alpha,许可证为 FSL-1.1-Apache-2.0。其 Advisors 文档称多数检查是静态的,在代码生成或构建时对声明的表结构和发现的调用点运行。
  • 文档中与费用相关的检查:count_without_index(每次调用扫描全表)、unbounded_loop 与 dispatch_cycle(无限链条每轮都计费)、queue_dispatch_cycle(消费者把消息重新投回自己的队列,队列永不清空)、cron_every_minute(每分钟触发一次,无论有无任务都计费)、container_long_sleep_after(空闲窗口超过一小时,空闲期间仍计费)。
  • 作者在回复中称,lunora-cloudflare-audit 技能串起 doctor、advisor 和 insights,并读取上月用量;预算预警标为「未检查」,因为 Cloudflare 没有相应 API,且预警只会发邮件。

原始来源

  1. 发布

    Daniel(@_prisis_)认为 Cloudflare 账单突增通常源于循环而不是流量;他的框架 Lunora 现在在代码生成阶段(部署前)标出 count_without_index、queue_dispatch_cycle、cron_every_minute、container_long_sleep_after,并说明各自推高哪项计费。

    Daniel

    @_prisis_ · 𝕏 原帖

    a cloudflare bill spike is usually a loop, not traffic. lunora now catches the common ones at codegen, before deploy: count_without_index, queue_dispatch_cycle, cron_every_minute, container_long_sleep_after. each finding names the billing meter it moves.
  2. 作者引用 WquGuru 的审计提示词称:预算预警只发邮件,从不停表;Lunora 已把其中代码层面的检查做成静态 lint。

    到 𝕏 阅读

    Daniel

    @_prisis_ · 𝕏 原帖

    Solid checklist, and the last line matters most: a budget alert only emails you, it never stops the meter. We ended up building the code half of this into Lunora as static lints, so they run at codegen time rather than after the invoice. https://t.co/8bagCD5tr4
  3. 回复:lunora-cloudflare-audit 技能读取上月用量;预算预警标为「未检查」,因为 Cloudflare 没有相应 API。

    到 𝕏 阅读

    Daniel

    @_prisis_ · 𝕏 原帖

    there is a lunora-cloudflare-audit skill that chains doctor, advisor and insights, then reads last month's usage with `lunora cloudflare alerts`. budget alerts it marks "not inspected", because cloudflare has no api for them. they only email you anyway. alpha: https://t.co/W4vaq0BaJ2
  4. Advisors 文档(2026-10-22 读取):静态检查清单,含上述与费用相关的条目及其级别和检测内容。

    打开原始来源
作者经验D1 +1

hontrandev:一次 Workers Free 的 D1 看板列表查询读取约 15,000 行以返回 58 行

2026-11-18,X 用户 @hontrandev 写道,Cloudflare 发邮件称,一个小型内部工单应用的 D1 已达到 Workers Free 每天 5 million 行读取限制的 78%。作者称有一条看板列表查询读取约 15,000 行以返回 58 行,并称已写下原因以及修复方法,回复中附有链接。这是 Free 每日上限上的用量警告,不是发票金额。

D1

Kun Save Point(@Savepoint_kk):D1 bug 反复重写未变数据,账单 $2,739.12,获 $2,141 善意抵扣。

Kun Save Point(@Savepoint_kk)是一名自称刚失业的独立开发者,称一个 bug 反复重写未变化的数据,低效查询又放大了读取,产生 $2,739.12 的 Cloudflare 账单并已通过 PayPal 支付(D1 写入行 $2,641.00、读取行 $64.06、其他服务 $34.06);他说平时每月账单不到 $10。Cloudflare 在工单 #02391058 中给予 $2,141 善意账户抵扣。他请求改为退回原 PayPal 付款,或至少减免 $2,641 写入费用;之后他写道最初请求被拒,现已重新开启进一步复核。10 月 25 日他补充称,自己错过了 Cloudflare 发出的唯一一封警报邮件,其中的金额并不特别高,并且在银行卡大额扣款之前没有收到进一步警告;10 月 26 日他写道,退回原支付方式的退款请求仍在进一步审核中。11月10日他发布一条时间线称,在 11月10–11日跟进后,支持再次表示 $2,141 只能保留为账户抵免,余下的 $598.12 在工单即将关闭时仍未决定。

作者经验Workers +6

从白嫖 18 个月到月付 72 美元:Meathill 的 Cloudflare 账单复盘

Meathill 拆解自己 20 个域名、十几个项目的 49 笔 Cloudflare 扣款,把域名续费和每月用量结算分开,并总结四个“扣费刺客”:Worker 响应未缓存、Images、Workers Observability 与缓存位置选择。