sorabhgit opened a new issue #17127: URL: https://github.com/apache/airflow/issues/17127
### Discussed in https://github.com/apache/airflow/discussions/17126 <div type='discussions-op-text'> <sup>Originally posted by **sorabhgit** July 21, 2021</sup> Hello Guys , I am also struggling with issue while setting up schedulers HA with Airflow 2.1.0 version . I've installed airflow scheduler on 2 separate nodes with both pointing to same mysql8 but gets below error in one of the airflow scheduler logs : Steps to reproduce : 1. Install Airflow 2.1.0 on 2 nodes using Mysql 8.0.25 . 2. use_row_level_locking = True ( in airflow.cfg of both the nodes ) 2. Start scheduler,webserver,celery worker on node1 and just scheduler on node2 . 3. Execute any example DAG and one of the scheduler will exit/failed with below error . `[^[[34m2021-07-01 08:15:04,342^[[0m] {^[[34mscheduler_job.py:^[[0m1302} ERROR^[[0m - Exception when executing SchedulerJob._run_scheduler_loop^[[0m Traceback (most recent call last): File "/usr/local/lib64/python3.6/site-packages/mysql/connector/connection_cext.py", line 337, in get_rows else self._cmysql.fetch_row() _mysql_connector.MySQLInterfaceError: Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context cursor, statement, parameters, context File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute cursor.execute(statement, parameters) File "/usr/local/lib64/python3.6/site-packages/mysql/connector/cursor_cext.py", line 277, in execute self._handle_result(result) File "/usr/local/lib64/python3.6/site-packages/mysql/connector/cursor_cext.py", line 172, in _handle_result self._handle_resultset() File "/usr/local/lib64/python3.6/site-packages/mysql/connector/cursor_cext.py", line 671, in _handle_resultset self._rows = self._cnx.get_rows()[0] File "/usr/local/lib64/python3.6/site-packages/mysql/connector/connection_cext.py", line 368, in get_rows sqlstate=exc.sqlstate) mysql.connector.errors.DatabaseError: 3572 (HY000): Statement aborted because lock(s) could not be acquired immediately and NOWAIT is set. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 1284, in _execute num_queued_tis = self._do_scheduling(session) File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 1546, in _do_scheduling num_queued_tis = self._critical_section_execute_task_instances(session=session) File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 1142, in _critical_section_execute_task_instances return func(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 900, in _executable_task_instances_to_queued pools = models.Pool.slots_stats(lock_rows=True, session=session) </div> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
