You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase Cloud Functions中Firestore doc.get()偶发请求缓慢问题咨询

Firebase Firestore doc.get() 在Cloud Function中偶尔耗时2.5-3秒的问题

我发现一个特殊问题:在使用Firebase Firestore数据库的doc(DOC_ID).get()函数时,该函数通常运行良好且响应迅速,但在我的Cloud Function中偶尔会出现耗时2.5-3秒的情况。

相关代码如下:

console.log("StreamID", streamId)

const stream = await admin.firestore()
               .collection(COLLECTION_PRODUCT_STREAMS)
               .doc(streamId).get();

console.log("Product stream obj", stream.id)

Google Cloud Function的日志截图:
Cloud Function日志截图

内容的提问来源于stack exchange,提问作者Alexander Korolchuk

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 11:05:22