Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background GCF中使用setTimeout配合pubsub进行重试会导致该GCF超时 #6

Open
mrdulin opened this issue Oct 23, 2018 · 0 comments

Comments

@mrdulin
Copy link
Owner

mrdulin commented Oct 23, 2018

需求:定时调用GCF

思路1:在GCF中使用setTimeout作为定时器,使用google pubsub再次publish消息到触发该GCFTOPIC

当设置GCF的超时时间为10秒,通过环境变量指定setTimeout的时间为15秒,会导致GCF超时。

image

GCF超时日志:

image

还有一个问题是,在GCF中使用setTimeout会导致该GCF一直处在执行过程中,这样会导致费用上升,因为GCF的是根据调用次数和执行时间来收费的。

参考:

@mrdulin mrdulin changed the title GCF中使用setTimeout配合pubsub进行background GCF重试会导致超时 background GCF中使用setTimeout配合pubsub进行重试会导致该GCF超时 Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant