Requirements installation timeout

1

We recently updated our Airflow environment to version 2.6.3.
After few days we wanted to update the plugins without changing the requirements, but started getting an error
WARNING: requirements.txt installation timed out after 9 minutes. Some requirements may not have installed
It is specified as a warning, but is actually an error, as it interrupts the update.
All out requirements are delivered as wheels (only .whl files, not sdist) inside plugins.zip and their versions are pinned using constraints.txt.

How to solve this problem? It never occurred before, but now it happens all the time.

已提問 8 個月前檢視次數 263 次
1 個回答
0

Hi,

The error "requirements.txt installation timed out after 9 minutes" occurs because the environment was spending time for backtracking to find a compatible versions. For this, pip will try every possible combination that it needs to and determine that there is no compatible set. It looks like it could not find it in given time frame[1]. This is also mentioned in the AWS documentation [2] - "Although Amazon MWAA doesn't limit the size of a plugins.zip file explicitly, if dependencies can't be installed within ten minutes, the Fargate service will time-out and attempt to rollback the environment to a stable state".

In your case, I suspect if there is any package version incompatibility introduced in the environment due to airflow version difference that might be creating difficulties for pip to install the packages. I recommend you to perform a testing using the MWAA local runner [3] using the same plugins and requirements to find out the culprit dependency and try to either eliminate it or change the package version. Also, if you plan on changing any package version, make sure that it aligns with the latest constraint file [4].

References:

[1] https://pip.pypa.io/en/latest/topics/dependency-resolution/

[2] https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html

[3] https://github.com/aws/aws-mwaa-local-runner

[4] https://raw.githubusercontent.com/apache/airflow/constraints-2.6.3/constraints-3.10.txt

AWS
支援工程師
已回答 8 個月前
profile picture
專家
已審閱 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南