具有Firestore的Firebase Cloud功能返回“截止日期超出”

编程入门 行业动态 更新时间:2024-10-27 22:34:48
本文介绍了具有Firestore的Firebase Cloud功能返回“截止日期超出”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我从Firestore文档中获取了一个示例函数,并且能够从我的本地firebase环境成功运行它。但是,一旦我部署到我的firebase服务器,该功能就完成了,但是没有在firestore数据库中创建任何条目。 firebase功能日志显示截止日期已超过。我有点困惑。任何人都知道为什么会发生这种情况以及如何解决这个问题?

I took one of the sample functions from the Firestore documentation and was able to successfully run it from my local firebase environment. However, once I deployed to my firebase server, the function completes, but no entries are made in the firestore database. The firebase function logs show "Deadline Exceeded." I'm a bit baffled. Anyone know why this is happening and how to resolve this?

以下是示例函数:

exports.testingFunction = functions.https.onRequest((request, response) => { var data = { name: 'Los Angeles', state: 'CA', country: 'USA' }; // Add a new document in collection "cities" with ID 'DC' var db = admin.firestore(); var setDoc = db.collection('cities').doc('LA').set(data); response.status(200).send(); });

推荐答案

Firestore有限制。

Firestore has limits.

可能因为限制而超出截止日期。

Probably "Deadline Exceeded" happens because of its limits.

请参阅此内容。 firebase.google/docs/firestore/quotas

每秒1次文档的最大写入率

Maximum write rate to a document 1 per second

groups.google/forum /#!msg / google-cloud-firestore-discuss / tGaZpTWQ7tQ / NdaDGRAzBgAJ

更多推荐

具有Firestore的Firebase Cloud功能返回“截止日期超出”

本文发布于:2023-11-22 05:15:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616108.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:截止日期   功能   Firestore   Firebase   Cloud

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!