Realtime: Project suspended for exceeding quotas
如果你的项目因为实时使用量被暂停,这意味着你的项目超出了你套餐的配额,并且因为异常高的实时资源消耗而被标记。
🌐 If your project has been suspended due to Realtime usage, it means your project exceeded the quotas for your plan and was flagged for unusually high consumption of Realtime resources.
怎么知道你的项目是否被暂停了 #
🌐 How to know if your project was suspended
当你的项目禁用实时功能时,你会在 Realtime 日志 中看到错误代码 RealtimeDisabledForTenant。在客户端,连接将无法建立,现有的订阅也将停止接收事件。
🌐 When Realtime is disabled for your project, you will see the error code RealtimeDisabledForTenant in your Realtime logs. On the client side, connections will fail to establish and existing subscriptions will stop receiving events.
如果你遇到这个错误,这意味着实时功能在你的项目中已被明确禁用,你应该联系支持了解原因并解决问题。
🌐 If you encounter this error, it means Realtime has been explicitly disabled for your project and you should contact support to understand why and resolve the issue.
项目为什么会被暂停 #
🌐 Why projects get suspended
Supabase 会监控所有项目的实时使用情况,以确保平台对所有人都稳定。当某个项目持续大幅超出其计划限制时,可能会被人工暂停。这种情况可能发生在:
🌐 Supabase monitors Realtime usage across all projects to ensure platform stability for everyone. When a project consistently exceeds its plan limits by a significant margin, it may be manually suspended. This can happen when:
暂停不是自动的,会在审核后执行。目的是保护共享的基础设施,同时给你机会解释和解决问题。
🌐 Suspension is not automatic and is applied after review. The goal is to protect shared infrastructure while giving you the opportunity to explain and resolve the situation.
过度使用的常见原因 #
🌐 Common causes of excessive usage
在大多数情况下,超额使用配额是意外的,而不是故意的:
🌐 In most cases, quota overages are accidental rather than intentional:
- 重连循环:一个无法认证或订阅的客户端可能会快速重试,从而产生数千个短时连接
- 失控的通道:创建通道却不清理它们会导致资源耗尽(参见 修复 TooManyChannels 错误)
- 组件卸载时缺少清理:单页应用在组件被移除时如果没有取消订阅,随着时间推移可能会累积连接
- 意外的流量激增:一次病毒事件或机器人流量可能会让使用量远超正常水平
- 开发或测试配置错误:负载测试或预发布环境意外指向了生产项目
如果你的项目被暂停,该怎么办 #
🌐 What to do if your project is suspended
- 提交支持请求:请联系支持并包括:
- 你的项目参考编号
- 对你的实时用例的描述(哪些功能使用 Broadcast、Presence 或 Postgres Changes)
- 你预期的并发连接数和消息吞吐量的估算
- 你最近对应用做过什么改动可能导致了这个激增吗
- 查看你的使用情况:在等待回复的同时,查看你项目仪表板中的实时报告,了解导致使用量升高的原因。
- 识别并解决根本原因:常见的解决方法包括:
- 在你的客户端代码中添加适当的通道清理
- 为重连逻辑实现指数退避
- 升级你的套餐以匹配你的实际使用需求
- 分开开发和生产环境
Supabase 团队会审查你的情况,了解使用是否是意外还是预期的。如果使用是合法的,团队可以和你一起找到合适的方案或调整你项目的限制。如果是意外的,一旦你解决了根本问题,暂停就可以解除。
🌐 The Supabase team will review your case to understand whether the usage was accidental or expected. If the usage is legitimate, the team can work with you to find the right plan or adjust limits for your project. If it was accidental, once you've resolved the underlying issue, the suspension can be lifted.
如何避免被暂停 #
🌐 How to avoid suspension
- 通过 实时报告 页面定期查看你的使用情况
- 如果你的连接或消息接近套餐限额,就设置提醒吧
- 遵循通道管理最佳实践来避免资源泄漏
- 查看你的计划的实时限制,在超出之前升级吧
- 使用 实时检查器 在部署前测试和调试连接
相关故障排除指南 #
🌐 Related troubleshooting guides
- 修复 TooManyChannels 错误 — 通道生命周期管理和清理最佳实践
- 并发峰值连接配额 — 了解并发连接配额以及如何调整它
- 在后台应用中处理静默断开连接 — 修复浏览器或操作系统后台模式导致的 WebSocket 中断
- TIMED_OUT 连接错误 — 解决 Node.js 版本不兼容问题
- 使用记录器和日志级别进行实时调试 — 启用客户端日志以诊断连接和消息问题
- 实时心跳消息 — 通过心跳回调监控连接状态