问:执行Cloud函数是否有保证的最大时间限制?考虑偶尔的冷启动 [英] Q. Is there a guaranteed max time limit for a Cloud function to execute? considering the occasional cold starts

查看:81
本文介绍了问:执行Cloud函数是否有保证的最大时间限制?考虑偶尔的冷启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google dialogflow为零售店制作Whatsapp聊天机器人.我正在使用云功能来执行某些操作,例如创建订单,获取可用的产品,这些操作在其他端点(例如网站和应用程序)之间很常见.

I'm using Google dialogflow to make a Whatsapp Chatbot for a retail store. I'm using cloud functions to carry out certain operations such as create orders, fetch available products, which are common between other endpoints such as websites and apps.

随着云功能开始冷启动,有时云功能需要很长的响应时间,而dialogflow无法给出响应,因为它的最大响应时间为5秒.

As cloud functions undergo cold starts, sometimes the cloud functions take long to respond and dialogflow fails in giving a response as it has a max response time of 5 seconds.

云功能执行所需的时间是否有上限?如果没有,我该如何在dialogflow中处理此问题.

Is there any upper limit on the time a cloud function can take to execute? If not, how do i handle this issue in dialogflow.

推荐答案

根据官方GCP

函数执行时间受超时持续时间的限制,您可以可以在功能部署时指定.默认情况下,一个功能计时 1分钟后退出,但您可以将此时间延长到 9分钟.

Function execution time is limited by the timeout duration, which you can specify at function deployment time. By default, a function times out after 1 minute, but you can extend this period up to 9 minutes.

这篇关于问:执行Cloud函数是否有保证的最大时间限制?考虑偶尔的冷启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆