-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: Warning for _AIRFLOW_PATCH_GEVENT #40677
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
The compat error already fixed in main. |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Thanks @potiuk, out of curiosity I would love to learn more about the fix if you have a commit, pull request or anything. |
I'm not sure how this is related, but thanks for your time @potiuk |
Your PR failed (in compatibility tests) because of a main issue that this PR fixed - maybe that was not clear :). It was only CI issue - maybe It was too much brevity in the description :) |
Oh thanks for the precision, I misunderstood your first message, have a great day :) |
Hi,
I recently had a huge pain point with Airflow running on ECS via the official airflow Docker image (
apache/airflow:2.9.2
).For the configuration I have a scheduler (4 vCPU, 8 Gib), some workers (4 vCPU, 8 Gib) and a webserver (2 vCPU, 4 Gib).
Every containers are sharing the same environment variables to apply the same configuration anywhere.
The problem was that at some point, the scheduler were non-stop crashing with the following error:
The first attempt was to increase the maximum file descriptor for the
airflow
user from 1000 (default) to 65535 (root limit) which works some time but after some days the problem came back.After many (many) unsuccessful attempts, I saw some content related with this error and the gevent patching.
The webserver is using
AIRFLOW__WEBSERVER__WORKER_CLASS=gevent
so it naturally came with_AIRFLOW_PATCH_GEVENT=1
.As the environment variables are shared between all containers, it means that the
_AIRFLOW_PATCH_GEVENT
environment variable was applied on the webserver but also on the scheduler.I'm not a Python expert but the conclusion was that the gevent patching was affecting the
multiprocessing
module via the duplex sockets then causing troubles on the scheduler internal communications.As it was a painful problem to solve I'm proposing this documentation upgrade to warn anyone to apply this setup.
I'm not sure if it's the right way to do it but feel free to take/modify/close this merge request the way you want, as it can already serve anyone searching for this error via Google.
Thanks
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.