如何修复因为30秒超时错误而导致无法导入DAGs?

huangapple go评论126阅读模式
英文:

How to fix failed to import DAGs due to 30s timeout errors?

问题

我们有多个mw1.large MWAA环境,每天都会出现导入错误,错误信息为airflow.exceptions.AirflowTaskTimeout: DagBag import timeout for ..dag_name.py after 30.0s

这些错误并不会阻塞任何操作,因为它们很快就消失了。错误指向了最佳实践文档,但我认为我们的DAG并不特别复杂。在所有环境中,我们每天至少会看到1个导入错误。

想知道是否有除了增加超时时间之外的其他建议。

英文:

We have multiple mw1.large MWAA environments and we are seeing import errors everyday which say
airflow.exceptions.AirflowTaskTimeout: DagBag import timeout for ..dag_name.py after 30.0s.

They are not blocking anything as they disappear quickly. The errors point to best practices doc but I don't think our DAGs are particularly complex. We see at least 1 import error every day in all environments.

Want to know if there are any other recommendations apart from increasing the timeout.

答案1

得分: 3

你可以尝试增加 dagbag 导入超时。同时,检查你的 DAGs 是否包含顶层代码,这被认为是 Airflow 的反模式。

英文:

You can try increasing the dagbag import timeout. Also, review your DAGs for top-level code, which is considered an Airflow antipattern.

huangapple
  • 本文由 发表于 2023年8月5日 16:12:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76840709.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定