错误:函数崩溃超出了请求范围函数被杀死 [英] Error: function crashed out of request scope Function killed
问题描述
当我使用Google云端功能在Firebase中导入300多条记录时,出现错误:
When I am importing more than 300 record in firebase using google cloud function than am getting error :
- 错误:函数崩溃超出了请求范围函数被杀死.
- 函数执行耗时31903 ms,状态为:连接错误"
推荐答案
在不了解您的代码的情况下,我只能猜测. 功能在请求范围之外崩溃"表示云功能已在异步功能完成之前完成.请参阅以获取有关处理异步功能和承诺的文档: https://firebase.google.com/docs/functions/terminate-functions
Without a glimpse into your code, I only can guess. "Function crashed outside of request scope" indicates that the cloud function had finished before the asynchronous function(s) did. See for documentation for handling async functions and promises: https://firebase.google.com/docs/functions/terminate-functions
仔细检查您的退货.确保您不要忘记将诺言返回给功能.有关示例,请参见此处: https://github.com/firebase/firebase-functions/issues/18#issuecomment-288375709
Take a closer look at your returns. Make sure you don't forget to return the promise to functions. For an example see also here: https://github.com/firebase/firebase-functions/issues/18#issuecomment-288375709
这篇关于错误:函数崩溃超出了请求范围函数被杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!