问题描述
我注意到我有多个函数正在运行但永无止境,因为它们从未到达 context.done()
调用.(这是一个 NodeJS 函数).
I noticed I have multiple functions running but never ending because they never get to the context.done()
call. (This is a NodeJS function).
如何在不删除整个函数的情况下停止这些正在运行的函数?
- 在管理"选项卡中禁用该功能会阻止它启动更多实例,但不会结束现有实例.
- Kudu 不允许我访问 TASKKILL.
推荐答案
您可以简单地重启 Function App 站点,这将终止所有功能(Function App Settings > Go To App Service Settings > Restart).
You have the ability to simply restart the Function App site, which will kill any functions (Function App Settings > Go To App Service Settings > Restart).
p>
如果您在动态计划上运行,请确保您已升级到最新版本的运行时,因为超时功能现已生效,将阻止函数无限期执行.
If you are running on a dynamic plan, please make sure you have upgraded to the latest version of the runtime, as a timeout feature is now in effect and will prevent functions from executing indefinitely.
这篇关于停止/终止正在运行的 Azure 函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!