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.

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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠