Firebase Cloud Functions - 请求被中止,因为没有可用的实例
Firebase Cloud Functions - The request was aborted because there was no available instance
部署功能后,我多次出现此间歇性错误。
Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.
错误日志还显示"The request was aborted because there was no available instance."
通常,error 发生在 Cloud Functions 基础设施无法足够快地扩展实例以处理传入负载时。因此,请求被中止,因为没有实例可用于处理请求。
这可能是由于以下情况造成的:
- 流量突然增加。
- 冷启动时间长。
- 请求处理时间长。
- 高函数错误率。
- 达到最大实例限制,因此系统无法进一步扩展。
- 归因于 Cloud Functions 服务的暂时性因素。
要缓解此问题,您可以配置 minimum instances other than 0 for the Cloud Function to avoid cold start and make sure there are instances ready to serve the requests. However, note that setting the minimum instances will incur additional charges。
部署功能后,我多次出现此间歇性错误。
Error: Server Error The server encountered an error and could not complete your request. Please try again in 30 seconds.
错误日志还显示"The request was aborted because there was no available instance."
通常,error 发生在 Cloud Functions 基础设施无法足够快地扩展实例以处理传入负载时。因此,请求被中止,因为没有实例可用于处理请求。
这可能是由于以下情况造成的:
- 流量突然增加。
- 冷启动时间长。
- 请求处理时间长。
- 高函数错误率。
- 达到最大实例限制,因此系统无法进一步扩展。
- 归因于 Cloud Functions 服务的暂时性因素。
要缓解此问题,您可以配置 minimum instances other than 0 for the Cloud Function to avoid cold start and make sure there are instances ready to serve the requests. However, note that setting the minimum instances will incur additional charges。