-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Airflow-2.6.3 Mysql: Deadlock found when trying to get lock; try restarting transaction #35144
Comments
|
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
I've unable to reproduce with this description and simple DAG import pendulum
from airflow.decorators import task
from airflow.models.dag import DAG
from airflow.operators.empty import EmptyOperator
for ix in range(1, 4):
with DAG(
f"issue_35144_dag_{ix}",
start_date=pendulum.datetime(2023, 6, 1, tz="UTC"),
schedule="@daily",
catchup=True,
max_active_runs=16,
tags=["issue", "35144", f"no: {ix}"]
):
@task
def div(x):
return x / 0
div.expand(x=list(range(3))) >> EmptyOperator(task_id="empty", trigger_rule="all_done")In my case (main branch, MySQL 8.0, ARM) it works without any deadlocks Could you provide more details when it happen, some reproducible DAG example also would be nice, and what version of MySQL Database do you use? |
|
had the exactly same problem , once the task instance increase ,the schelduler shut down. |
You mean increased number of simultaneous Task Instances? If so, what numbers of TI are we talking about? 10-100-1000? Any chance to get reproducible cases? Without it will be difficult to understand what exactly is the reason to that deadlocks. |
the lock in db as follows: UPDATE dag_run SET last_scheduling_decision='2023-10-26 10:22:41.409798', updated_at='2023-10-26 10:22:41.599107' WHERE dag_run.id = 253 |
|
@langfu54 In your case you could try to set This PR also potentially could things better #33527 (should be part of Airflow 2.8) but no guarantee |
|
appreciate your help , it looks that , airflow works correctly now . |
|
This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
|
This issue has been closed because it has not received response from the issue author. |

Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
What you think should happen instead
No response
How to reproduce
When multiple dag tasks fail simultaneously
Operating System
centos7
Versions of Apache Airflow Providers
apache-airflow 2.6.3
apache-airflow-providers-celery 3.2.1
apache-airflow-providers-common-sql 1.5.2
apache-airflow-providers-datadog 3.3.1
apache-airflow-providers-ftp 3.4.2
apache-airflow-providers-http 4.4.2
apache-airflow-providers-imap 3.2.2
apache-airflow-providers-mysql 5.1.1
apache-airflow-providers-redis 3.2.1
apache-airflow-providers-sqlite 3.4.2
Deployment
Virtualenv installation
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: