[QUESTION] 关于Cloudflare免费套餐下,中等强度使用持续超出CPU限制的长期风险咨询 #1

Closed
opened 2026-10-07 16:43:30 +00:00 by xixu-me · 4 comments
Owner

Pre-submission Checklist

  • I have searched existing issues and discussions
  • I have checked the documentation
  • This is a specific question that needs clarification

Question Category

Deployment

Your Question

我的核心疑问是:尽管目前翻译功能完全正常,但这种每次请求都稳定触发CPU超时错误的情况(即使是在中等使用强度下),在未来是否有可能被Cloudflare的风控系统注意到,从而导致我的账户或服务被暂停或限制?

Context and Background

我正在尝试将 DeepLX 项目作为个人长期、稳定使用的翻译代理服务。主要的使用场景是通过“沉浸式翻译”浏览器插件,满足日常网页浏览时的翻译需求。我希望尽可能在Cloudflare的免费套餐下实现这一目标。

Current Setup

Current Setup

项目: DeepLX

部署平台: Cloudflare Workers (Free Plan)
插件设置rps120(10个您提供的 10个自部署),每次最多提交5000字符

使用场景: 个人使用,配合“沉浸式翻译”插件。

观察到的现象: 在进行网页翻译时,即使不是非常高强度的并发,几乎每一次翻译请求都会在Cloudflare后台日志中记录 Worker exceeded CPU time limit 的错误,超出了免费套餐的10ms CPU时间限制。
每次记录的时间大约为2000ms。
当前状态: 尽管后台有CPU超时报错,但翻译功能完全正常,响应速度也很快。

Relevant Code

为了解决之前的KV写入限制问题,我已经修改了 rateLimit.ts 文件,将与KV写入相关的代码行进行了注释。目前唯一的问题就是CPU超时。

Expected Outcome

我希望能够得到项目作者或社区的看法和建议。我想了解这种持续超出CPU限制的模式是否存在长期风险。如果存在风险,是否有推荐的、能在免费套餐下稳定运行的配置方法或优化建议?

Additional Information

我需要强调的是,我的使用强度并非持续性的高并发,而是个人在浏览网页时产生的、相对分散的翻译请求。尽管如此,单次请求的CPU消耗似乎就足以超出10ms的限制。我非常感谢这个优秀的项目,并希望能找到一个长期稳定的使用方案。

Urgency

Not urgent (learning/exploring)

Community Help

  • This question might be common for other users
  • The answer could improve documentation
  • This relates to a potential feature request
  • This might reveal a bug or issue

GitHub 来源:https://github.com/xixu-me/deeplx/issues/5
作者:taozhe6 · 创建时间:2025-09-02T16:34:47Z

### Pre-submission Checklist - [x] I have searched existing issues and discussions - [x] I have checked the documentation - [x] This is a specific question that needs clarification ### Question Category Deployment ### Your Question 我的核心疑问是:尽管目前翻译功能完全正常,但这种每次请求都稳定触发CPU超时错误的情况(即使是在中等使用强度下),在未来是否有可能被Cloudflare的风控系统注意到,从而导致我的账户或服务被暂停或限制? ### Context and Background 我正在尝试将 DeepLX 项目作为个人长期、稳定使用的翻译代理服务。主要的使用场景是通过“沉浸式翻译”浏览器插件,满足日常网页浏览时的翻译需求。我希望尽可能在Cloudflare的免费套餐下实现这一目标。 ### Current Setup Current Setup 项目: DeepLX 部署平台: Cloudflare Workers (Free Plan) 插件设置rps120(10个您提供的 10个自部署),每次最多提交5000字符 使用场景: 个人使用,配合“沉浸式翻译”插件。 观察到的现象: 在进行网页翻译时,即使不是非常高强度的并发,几乎每一次翻译请求都会在Cloudflare后台日志中记录 Worker exceeded CPU time limit 的错误,超出了免费套餐的10ms CPU时间限制。 每次记录的时间大约为2000ms。 当前状态: 尽管后台有CPU超时报错,但翻译功能完全正常,响应速度也很快。 ### Relevant Code ```typescript 为了解决之前的KV写入限制问题,我已经修改了 rateLimit.ts 文件,将与KV写入相关的代码行进行了注释。目前唯一的问题就是CPU超时。 ``` ### Expected Outcome 我希望能够得到项目作者或社区的看法和建议。我想了解这种持续超出CPU限制的模式是否存在长期风险。如果存在风险,是否有推荐的、能在免费套餐下稳定运行的配置方法或优化建议? ### Additional Information 我需要强调的是,我的使用强度并非持续性的高并发,而是个人在浏览网页时产生的、相对分散的翻译请求。尽管如此,单次请求的CPU消耗似乎就足以超出10ms的限制。我非常感谢这个优秀的项目,并希望能找到一个长期稳定的使用方案。 ### Urgency Not urgent (learning/exploring) ### Community Help - [x] This question might be common for other users - [x] The answer could improve documentation - [ ] This relates to a potential feature request - [ ] This might reveal a bug or issue --- GitHub 来源:https://github.com/xixu-me/deeplx/issues/5 作者:taozhe6 · 创建时间:2025-09-02T16:34:47Z <!-- github-archive:3376760195 -->
xixu-me added the question label 2026-10-07 16:43:30 +00:00
Author
Owner

针对该 issue,我能提供的信息仅为 Perplexity 中 GPT-5 Thinking 的生成的内容,如下所示,仅供参考;提示词为“When using the Cloudflare Workers free plan, if a large number of requests consistently exceed CPU time, is it possible that this will be noticed by Cloudflare's risk management system and result in service or account throttling or suspension?”。

简短结论:在 Cloudflare Workers 免费版中,频繁“超出 CPU 时间”的请求一般只会在调用层面被直接终止并返回 1102 错误,并不会自动触发所谓的风控对服务或账户进行节流或封禁;若持续发生,仍是这些超限调用被终止,而非账户整体被处理 [1][2][3]。

超限时会发生什么

  • Workers 的 CPU 时间是指实际在 CPU 上执行代码的时间,等待网络 I/O 的时间不计入;当单次调用超出限额时,运行时会终止该次执行并向客户端返回“1102 Worker exceeded CPU time limit”错误页 [1][2]。
  • 官方说明对偶发的轻微超限有“弹性”,但如果“开始持续触碰上限”,执行会按配置的限制被直接终止,本质是调用级别的强制结束而非账户级惩罚 [3]。
  • 相关观测可在 Workers Logs/Trace 中查看 CPU time 和 Wall time,用于定位热点和优化路径,便于避免再次触发 1102 [3]。

何时可能出现节流或账户层面限制

  • 超过速率或配额时,会出现相应的自动化错误码与拦截:例如“1015 Burst rate limit”表示突发速率受限,“1027 Exceeded free tier daily request limit”表示免费层每日请求数触顶,这些属于平台层面的规则执行,而非风控对账号的人工处置 [2]。
  • 条款层面,Cloudflare 保留在违反服务条款时限制或终止服务的权利;例如对通过 CDN 不当分发大文件/视频的使用,条款明确可限制或停用相应能力(已从通用条款迁移至 CDN 专项条款并明确需使用 Stream/Images/R2 等对应服务),这类属于合规与滥用处置范畴,而不是单纯因 CPU 超限触发 [4][5]。
  • 因此,单纯大量请求“超出 CPU 时间”通常只会导致这些请求被终止并返回 1102,而不会直接引发对账号的节流或封禁;只有当行为触及速率/配额或违反条款的滥用边界时,才可能出现更高层面的限制 [1][2][3]。

降低风险与改进建议

  • 优化代码路径以减少 CPU time(避免长循环/同步重计算,利用 I/O 等待不计入 CPU 的特性),并通过日志持续观测 CPU time 与 Wall time,优先处理持续超限的端点 [3]。
  • 如确有计算密集需求,可评估升级以提高可配置的 CPU 上限(官方说明可把默认上限提高至分钟级),或通过架构拆分把重活移出边缘路径,减少边缘调用持续触顶的概率 [3]。
  • 免费与付费均包含日志功能,便于定位热点与验证优化效果;必要时也可结合速率/配额错误码(1015/1027)判断是否触发了平台侧的自动限制 [6][2]。

Citations:
[1] Error 1102 · Cloudflare Support docs https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1102/
[2] Errors and exceptions · Cloudflare Workers docs https://developers.cloudflare.com/workers/observability/errors/
[3] Limits · Cloudflare Workers docs https://developers.cloudflare.com/workers/platform/limits/
[4] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://blog.cloudflare.com/updated-tos/
[5] Service-Specific Terms - Cloudflare https://www.cloudflare.com/service-specific-terms-application-services/
[6] Pricing - Workers - Cloudflare Docs https://developers.cloudflare.com/workers/platform/pricing/
[7] Cloudflare Worker exceeded CPU time limit, while sign-up/email. https://www.answeroverflow.com/m/1357795265108512808
[8] Have You Encountered any Limitations with the 10ms CPU Time on ... https://www.reddit.com/r/sveltejs/comments/162vm33/have_you_encountered_any_limitations_with_the/
[9] How Cloudflare erroneously throttled a customer's web traffic https://blog.cloudflare.com/how-cloudflare-erroneously-throttled-a-customers-web-traffic/
[10] ENTERPRISE SUBSCRIPTION TERMS OF SERVICE | Cloudflare https://www.cloudflare.com/enterpriseterms/
[11] New! Rate Limiting analytics and throttling - The Cloudflare Blog https://blog.cloudflare.com/new-rate-limiting-analytics-and-throttling/
[12] Cloudflare Frequently Asked Questions https://www.cloudflare.com/plans/faq/
[13] Rate Limiting - Workers - Cloudflare Docs https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
[14] Free Plan Overview - Cloudflare https://www.cloudflare.com/plans/free/
[15] [BUG] First time load results in Error 1102 #598 - GitHub https://github.com/opennextjs/opennextjs-cloudflare/issues/598
[16] Error 1102 Worker Exceeded Resource Limits | How to Fix It https://www.seminarsonly.com/news/error-1102-worker-exceeded-resource-limits-how-to-fix-it/
[17] Cloudflare account suspended without notice - Reddit https://www.reddit.com/r/CloudFlare/comments/a22coc/cloudflare_account_suspended_without_notice/
[18] Cloudflare's abuse policies & approach https://blog.cloudflare.com/cloudflares-abuse-policies-and-approach/
[19] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://news.ycombinator.com/item?id=35961697
[20] How much traffic can Cloudflare's free plan handle? - Reddit https://www.reddit.com/r/CloudFlare/comments/1g17a6y/how_much_traffic_can_cloudflares_free_plan_handle/
[21] Cloudflare Enterprise Customer Support and Service Level Agreement https://www.cloudflare.com/enterprise-support-sla/
[22] Abuse approach - Cloudflare https://www.cloudflare.com/trust-hub/abuse-approach/
[23] The ineptitude of CloudFlare's Trust & Safety team - Reddit https://www.reddit.com/r/CloudFlare/comments/1ey77zr/the_ineptitude_of_cloudflares_trust_safety_team/
[24] Cloudflare's developer domains increasingly abused by threat actors https://www.bleepingcomputer.com/news/security/cloudflares-developer-domains-increasingly-abused-by-threat-actors/
[25] Abuse of Cloudflare domains for phishing doubled in 2024, report says https://www.scworld.com/news/abuse-of-cloudflare-domains-for-phishing-doubled-in-2024-report-says
[26] UAC-0125 Abuses Cloudflare Workers to Distribute Malware ... https://thehackernews.com/2024/12/uac-0125-abuses-cloudflare-workers-to.html
[27] Cloudflare Self-Serve Subscription Agreement https://www.cloudflare.com/terms/
[28] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://www.reddit.com/r/selfhosted/comments/13j4pft/goodbye_section_28_and_hello_to_cloudflares_new/
[29] DNS Proxy for media server? - Cloudflare Developers https://www.answeroverflow.com/m/1224522436922576916


另外,有时间会研究是否能通过修改代码解决超出 CPU 时间的问题;希望这些信息对您有用。


GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3247879313
作者:xixu-me · 创建时间:2025-09-03T06:39:26Z

针对该 issue,我能提供的信息仅为 Perplexity 中 GPT-5 Thinking 的生成的内容,如下所示,仅供参考;提示词为“When using the Cloudflare Workers free plan, if a large number of requests consistently exceed CPU time, is it possible that this will be noticed by Cloudflare's risk management system and result in service or account throttling or suspension?”。 简短结论:在 Cloudflare Workers 免费版中,频繁“超出 CPU 时间”的请求一般只会在调用层面被直接终止并返回 1102 错误,并不会自动触发所谓的风控对服务或账户进行节流或封禁;若持续发生,仍是这些超限调用被终止,而非账户整体被处理 [1][2][3]。 ## 超限时会发生什么 - Workers 的 CPU 时间是指实际在 CPU 上执行代码的时间,等待网络 I/O 的时间不计入;当单次调用超出限额时,运行时会终止该次执行并向客户端返回“1102 Worker exceeded CPU time limit”错误页 [1][2]。 - 官方说明对偶发的轻微超限有“弹性”,但如果“开始持续触碰上限”,执行会按配置的限制被直接终止,本质是调用级别的强制结束而非账户级惩罚 [3]。 - 相关观测可在 Workers Logs/Trace 中查看 CPU time 和 Wall time,用于定位热点和优化路径,便于避免再次触发 1102 [3]。 ## 何时可能出现节流或账户层面限制 - 超过速率或配额时,会出现相应的自动化错误码与拦截:例如“1015 Burst rate limit”表示突发速率受限,“1027 Exceeded free tier daily request limit”表示免费层每日请求数触顶,这些属于平台层面的规则执行,而非风控对账号的人工处置 [2]。 - 条款层面,Cloudflare 保留在违反服务条款时限制或终止服务的权利;例如对通过 CDN 不当分发大文件/视频的使用,条款明确可限制或停用相应能力(已从通用条款迁移至 CDN 专项条款并明确需使用 Stream/Images/R2 等对应服务),这类属于合规与滥用处置范畴,而不是单纯因 CPU 超限触发 [4][5]。 - 因此,单纯大量请求“超出 CPU 时间”通常只会导致这些请求被终止并返回 1102,而不会直接引发对账号的节流或封禁;只有当行为触及速率/配额或违反条款的滥用边界时,才可能出现更高层面的限制 [1][2][3]。 ## 降低风险与改进建议 - 优化代码路径以减少 CPU time(避免长循环/同步重计算,利用 I/O 等待不计入 CPU 的特性),并通过日志持续观测 CPU time 与 Wall time,优先处理持续超限的端点 [3]。 - 如确有计算密集需求,可评估升级以提高可配置的 CPU 上限(官方说明可把默认上限提高至分钟级),或通过架构拆分把重活移出边缘路径,减少边缘调用持续触顶的概率 [3]。 - 免费与付费均包含日志功能,便于定位热点与验证优化效果;必要时也可结合速率/配额错误码(1015/1027)判断是否触发了平台侧的自动限制 [6][2]。 Citations: [1] Error 1102 · Cloudflare Support docs https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1102/ [2] Errors and exceptions · Cloudflare Workers docs https://developers.cloudflare.com/workers/observability/errors/ [3] Limits · Cloudflare Workers docs https://developers.cloudflare.com/workers/platform/limits/ [4] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://blog.cloudflare.com/updated-tos/ [5] Service-Specific Terms - Cloudflare https://www.cloudflare.com/service-specific-terms-application-services/ [6] Pricing - Workers - Cloudflare Docs https://developers.cloudflare.com/workers/platform/pricing/ [7] Cloudflare Worker exceeded CPU time limit, while sign-up/email. https://www.answeroverflow.com/m/1357795265108512808 [8] Have You Encountered any Limitations with the 10ms CPU Time on ... https://www.reddit.com/r/sveltejs/comments/162vm33/have_you_encountered_any_limitations_with_the/ [9] How Cloudflare erroneously throttled a customer's web traffic https://blog.cloudflare.com/how-cloudflare-erroneously-throttled-a-customers-web-traffic/ [10] ENTERPRISE SUBSCRIPTION TERMS OF SERVICE | Cloudflare https://www.cloudflare.com/enterpriseterms/ [11] New! Rate Limiting analytics and throttling - The Cloudflare Blog https://blog.cloudflare.com/new-rate-limiting-analytics-and-throttling/ [12] Cloudflare Frequently Asked Questions https://www.cloudflare.com/plans/faq/ [13] Rate Limiting - Workers - Cloudflare Docs https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/ [14] Free Plan Overview - Cloudflare https://www.cloudflare.com/plans/free/ [15] [BUG] First time load results in Error 1102 #598 - GitHub https://github.com/opennextjs/opennextjs-cloudflare/issues/598 [16] Error 1102 Worker Exceeded Resource Limits | How to Fix It https://www.seminarsonly.com/news/error-1102-worker-exceeded-resource-limits-how-to-fix-it/ [17] Cloudflare account suspended without notice - Reddit https://www.reddit.com/r/CloudFlare/comments/a22coc/cloudflare_account_suspended_without_notice/ [18] Cloudflare's abuse policies & approach https://blog.cloudflare.com/cloudflares-abuse-policies-and-approach/ [19] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://news.ycombinator.com/item?id=35961697 [20] How much traffic can Cloudflare's free plan handle? - Reddit https://www.reddit.com/r/CloudFlare/comments/1g17a6y/how_much_traffic_can_cloudflares_free_plan_handle/ [21] Cloudflare Enterprise Customer Support and Service Level Agreement https://www.cloudflare.com/enterprise-support-sla/ [22] Abuse approach - Cloudflare https://www.cloudflare.com/trust-hub/abuse-approach/ [23] The ineptitude of CloudFlare's Trust & Safety team - Reddit https://www.reddit.com/r/CloudFlare/comments/1ey77zr/the_ineptitude_of_cloudflares_trust_safety_team/ [24] Cloudflare's developer domains increasingly abused by threat actors https://www.bleepingcomputer.com/news/security/cloudflares-developer-domains-increasingly-abused-by-threat-actors/ [25] Abuse of Cloudflare domains for phishing doubled in 2024, report says https://www.scworld.com/news/abuse-of-cloudflare-domains-for-phishing-doubled-in-2024-report-says [26] UAC-0125 Abuses Cloudflare Workers to Distribute Malware ... https://thehackernews.com/2024/12/uac-0125-abuses-cloudflare-workers-to.html [27] Cloudflare Self-Serve Subscription Agreement https://www.cloudflare.com/terms/ [28] Goodbye, section 2.8 and hello to Cloudflare's new terms of service https://www.reddit.com/r/selfhosted/comments/13j4pft/goodbye_section_28_and_hello_to_cloudflares_new/ [29] DNS Proxy for media server? - Cloudflare Developers https://www.answeroverflow.com/m/1224522436922576916 --- 另外,有时间会研究是否能通过修改代码解决超出 CPU 时间的问题;希望这些信息对您有用。 --- GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3247879313 作者:xixu-me · 创建时间:2025-09-03T06:39:26Z <!-- github-archive:3247879313 -->
Author
Owner

谢谢@xixu-me使用深度研究模型进行快速回答,我在Gemini-2.5-pro 深度检索的结果与其类似。我想问其他人有注意过类似的1102 error及其后续影响。似乎在代码层面优化200倍是不太可能的🤔,如后续遇到翻译失败,可能的解决方案包括切换帐户,升级套餐,更改每次请求的大小。


GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3250335411
作者:taozhe6 · 创建时间:2025-09-03T18:36:51Z

谢谢@xixu-me使用深度研究模型进行快速回答,我在Gemini-2.5-pro 深度检索的结果与其类似。我想问其他人有注意过类似的1102 error及其后续影响。似乎在代码层面优化200倍是不太可能的🤔,如后续遇到翻译失败,可能的解决方案包括切换帐户,升级套餐,更改每次请求的大小。 --- GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3250335411 作者:taozhe6 · 创建时间:2025-09-03T18:36:51Z <!-- github-archive:3250335411 -->
Author
Owner

我注意到今天查看CF日志,2000ms的超时无法复现,而是30ms左右的超时。我可能夸大了问题或者这只是一种冷启动的错误,感谢所有人的时间。我将后续再测试。


GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3250389531
作者:taozhe6 · 创建时间:2025-09-03T18:54:04Z

我注意到今天查看CF日志,2000ms的超时无法复现,而是30ms左右的超时。我可能夸大了问题或者这只是一种冷启动的错误,感谢所有人的时间。我将后续再测试。 --- GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3250389531 作者:taozhe6 · 创建时间:2025-09-03T18:54:04Z <!-- github-archive:3250389531 -->
Author
Owner

请问是否有需要更新的方面?若没有,请关闭 issue;若有,请具体指出。


GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3254952799
作者:xixu-me · 创建时间:2025-09-04T18:13:19Z

请问是否有需要更新的方面?若没有,请关闭 issue;若有,请具体指出。 --- GitHub 来源:https://github.com/xixu-me/deeplx/issues/5#issuecomment-3254952799 作者:xixu-me · 创建时间:2025-09-04T18:13:19Z <!-- github-archive:3254952799 -->
Sign in to join this conversation.