amazon-web-services - AWS SWF 自动取消子工作流程
问题描述
我有 AWS SWF 工作流程,它根据输入文件的数量在运行时创建许多子工作流程。对于 x 个输入文件,它将创建 x 个子工作流。当输入文件的数量在 400 个左右并成功创建和执行 400 个子工作流时,它可以正常工作。
The issue is - when my input has around 500 files or more, it starts that many child workflows successfully but then automatically cancels some of them. I have tried different configurations but nothing worked.
I think AWS limit for number of child workflows is 1000, so that should not be issue.
Current child workflow config: Execution Start To Close Timeout: 2 hours 1 minute Task Start To Close Timeout: 1 minute 30 seconds
Main workflow config: Execution Start To Close Timeout: 9 hours Task Start To Close Timeout: 1 minute 30 seconds
解决方案
我的猜测是工作流代码中引发了一些异常,默认情况下会取消相同取消范围内的工作流。阅读TryCatchFinally文档以获取有关取消语义的更多信息。
一般来说,我不会推荐 SWF 中的许多子工作流,您始终可以分层执行。像 30 个孩子一样,他们每个人 30 个孩子提供 900 个工作流程。
推荐阅读
- r - 使用 ggplot2 创建用于绘图的函数,并为该函数提供数据框、x 和 y。如何正确引用轴?
- javascript - 如何为此 jQuery 代码定义 if 语句?
- arduino - 在 Arduino 上制作一个由多个端口组成的“虚拟端口”
- php - 预匹配不允许撇号/单引号 (')
- javascript - 在动态插入的输入上设置 jquery 掩码?
- android - 更新到版本 4.10 后 Android Gradle 同步失败
- php - 无法在最新的 Ubuntu“18.04.2 LTS (Bionic Beaver)”上安装 php7.2-fpm
- angularjs - 如果刷新(JWT)令牌未经授权(401响应),AngularJS重定向到登录
- android - ContributesAndroidInjector 不注入模块
- python - 使用python比较两个大文件的模糊字符串匹配