问题描述
使用标准版的Azure Logic App服务,可以创建多个工作流(workflow),如果在启用/禁用其它的工作流时,是否会对正在运行其它工作流造成影响呢?
问题解答
在实际的测验中,我们得到的答案是:会造成影响!在Disabled/Enabled同一个Logic App中的Workflow时,正在运行的Workflow会受到影响!
一般影响:导致 Workflow 的执行时间变长
示例中的workflow正常执行时间为 70毫秒以内,但是在Disabled workflow期间,执行时间达到 3 秒。
严重情况:导致 Workflow 的执行失败
问题原因
在操作 Disabled / Endabled workflow的时候,Logic App会在环境变量中添加配置 Workflows.<workflowname>.FlowState = Disabled 项。 而在 App Service / Function App / Logic App 服务中,当修改配置项时,都会导致应用程序重启。
而在重启过程中,会对正在运行的workflow产生延迟影响,会等待重启完成后继续执行。所以如果 Workflow 中的某些action有时效性的要求,就会出现 Timeout 错误,最终使得 Workflow 执行失败。
查看错误信息
参考资料
禁用或启用逻辑应用资源: https://docs.azure.cn/zh-cn/logic-apps/manage-logic-apps-with-azure-portal?tabs=standard#disable-enable-logic-apps
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!