Add retry functionality for handling process termination caused by database network issues#31998
Merged
Conversation
yiqijiu
requested review from
XD-DENG,
ashb,
kaxil,
o-nikolas and
pierrejeambrun
as code owners
June 19, 2023 09:05
|
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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
hussein-awala
left a comment
Member
There was a problem hiding this comment.
Thank you for submitting this PR! It's a good enhancement. Could you please include a new test for this change? (in this file)
Member
|
Consider to read this doc to activate the pre-commit and fix static checks |
…celery_executor_utils
…celery_executor_utils
potiuk
approved these changes
Jun 26, 2023
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
ferruzzi
pushed a commit
to aws-mwaa/upstream-to-airflow
that referenced
this pull request
Jun 27, 2023
…tabase network issues (apache#31998)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #32045
In my production environment, the airflow application and the database are located on different networks. Due to the usage of the nullpool pool from SQLAlchemy in the celery's DatabaseBackend, network fluctuations occur, which can lead to the termination of the scheduler process.I have added retry logic based on the provided retry code from celery's DatabaseBackend.
Although my version is 2.2.3, I have analyzed it and found that it is also suitable for the current version.
Below is the error message: