You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/11 21:53:15 UTC
[GitHub] [airflow] wentaowanguc opened a new issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
wentaowanguc opened a new issue #12290:
URL: https://github.com/apache/airflow/issues/12290
Hi Team:
We got an error when we running airflow scheduler
`2020-11-11_20:09:26.59088 Process DagFileProcessor34125-Process:
2020-11-11_20:09:26.59091 Traceback (most recent call last):
2020-11-11_20:09:26.59092 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-11_20:09:26.59092 cursor, statement, parameters, context
2020-11-11_20:09:26.59093 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-11_20:09:26.59093 cursor.execute(statement, parameters)
2020-11-11_20:09:26.59094 sqlite3.OperationalError: database is locked
2020-11-11_20:09:26.59094
2020-11-11_20:09:26.59094 The above exception was the direct cause of the following exception:
2020-11-11_20:09:26.59095
2020-11-11_20:09:26.59095 Traceback (most recent call last):
2020-11-11_20:09:26.59096 File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
2020-11-11_20:09:26.59096 self.run()
2020-11-11_20:09:26.59097 File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
2020-11-11_20:09:26.59097 self._target(*self._args, **self._kwargs)
2020-11-11_20:09:26.59097 File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 159, in _run_file_processor
2020-11-11_20:09:26.59098 pickle_dags)
2020-11-11_20:09:26.59098 File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
2020-11-11_20:09:26.59099 return func(*args, **kwargs)
2020-11-11_20:09:26.59099 File "/usr/local/lib/python3.6/site-packages/airflow/jobs/scheduler_job.py", line 1609, in process_file
2020-11-11_20:09:26.59102 dag.sync_to_db()
2020-11-11_20:09:26.59103 File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
2020-11-11_20:09:26.59105 return func(*args, **kwargs)
2020-11-11_20:09:26.59105 File "/usr/local/lib/python3.6/site-packages/airflow/models/dag.py", line 1515, in sync_to_db
2020-11-11_20:09:26.59106 DagModel).filter(DagModel.dag_id == self.dag_id).first()
2020-11-11_20:09:26.59106 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3429, in first
2020-11-11_20:09:26.59107 ret = list(self[0:1])
2020-11-11_20:09:26.59107 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3203, in __getitem__
2020-11-11_20:09:26.59107 return list(res)
2020-11-11_20:09:26.59108 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
2020-11-11_20:09:26.59108 return self._execute_and_instances(context)
2020-11-11_20:09:26.59109 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
2020-11-11_20:09:26.59109 result = conn.execute(querycontext.statement, self._params)
2020-11-11_20:09:26.59109 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
2020-11-11_20:09:26.59112 return meth(self, multiparams, params)
2020-11-11_20:09:26.59113 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
2020-11-11_20:09:26.59113 return connection._execute_clauseelement(self, multiparams, params)
2020-11-11_20:09:26.59114 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
2020-11-11_20:09:26.59114 distilled_params,
2020-11-11_20:09:26.59114 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
2020-11-11_20:09:26.59115 e, statement, parameters, cursor, context
2020-11-11_20:09:26.59115 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
2020-11-11_20:09:26.59116 sqlalchemy_exception, with_traceback=exc_info[2], from_=e
2020-11-11_20:09:26.59116 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
2020-11-11_20:09:26.59117 raise exception
2020-11-11_20:09:26.59117 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-11_20:09:26.59117 cursor, statement, parameters, context
2020-11-11_20:09:26.59118 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-11_20:09:26.59121 cursor.execute(statement, parameters)
2020-11-11_20:09:26.59121 sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
2020-11-11_20:09:26.59122 [SQL: SELECT dag.dag_id AS dag_dag_id, dag.root_dag_id AS dag_root_dag_id, dag.is_paused AS dag_is_paused, dag.is_subdag AS dag_is_subdag, dag.is_active AS dag_is_active, dag.last_scheduler_run AS dag_last_scheduler_run, dag.last_pickled AS dag_last_pickled, dag.last_expired AS dag_last_expired, dag.scheduler_lock AS dag_scheduler_lock, dag.pickle_id AS dag_pickle_id, dag.fileloc AS dag_fileloc, dag.owners AS dag_owners, dag.description AS dag_description, dag.default_view AS dag_default_view, dag.schedule_interval AS dag_schedule_interval
2020-11-11_20:09:26.59122 FROM dag
2020-11-11_20:09:26.59123 WHERE dag.dag_id = ?
2020-11-11_20:09:26.59123 LIMIT ? OFFSET ?]
2020-11-11_20:09:26.59124 [parameters: ('example_passing_params_via_test_command', 1, 0)]
2020-11-11_20:09:26.59124 (Background on this error at: http://sqlalche.me/e/13/e3q8)`
It seems that airflow tried to get a dag example 'example_passing_params_via_test_command'. However, we don't unpause this dag. How can we prevent this error? Can we remove all dag examples?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-730021441
> > @kaxil : I think the main issue is why airflow frequently searches those dag examples in database? My understanding is that if we don't unpause a dag scheduler will skip it.
>
> Paused DAGs are skipped from scheduling but are still being parsed (entry created in the DB etc..)
But why airflow search those paused DAGs which cause this error? Does that mean we cannot have multiple dags be parsed in airflow? Otherwise, we will get the same error.
In addition, how can we remove all those dag examples? by setting load_examples as false in the configuration?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc edited a comment on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc edited a comment on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726222305
Hi @kaxil:
airflow version is 1.10.12
we use the default database
We don't know how to repeat it. The airflow scheduler was running correctly. We unpause one dag which is set to be executed daily. We got this error 8 hours after our dag was successfully executed.
Following are command we used to start the airflow scheduler:
`airflow initdb`
`sed -i 's/\/root\/airflow\/logs/\/logs\/optimizer-dataplan-processing\/airflow-scheduler/g' /root/airflow/airflow.cfg`
`sed -i 's/sqlite:\/\/\/\/root\/airflow\/airflow.db/sqlite:\/\/\/\/data\/airflow.db/g' /root/airflow/airflow.cfg`
`airflow initdb`
`airflow scheduler`
`execution_date=$(date --date="yesterday" +"%Y-%m-%d")`
`airflow run -m our_dag task1 $execution_date`
`airflow run -m our_dag task2 $execution_date`
`airflow run -m our_dag task3 $execution_date`
`airflow run -m our_dag task4 $execution_date`
`airflow unpause our_dag`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-725743794
Please add more information like Airflow Version used and how to reproduce the issue.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc edited a comment on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc edited a comment on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726326892
Hi team: we got another similar error, here is the log info:
```
2020-11-12_10:12:39.29731 Process ForkProcess-1:
2020-11-12_10:12:39.30395 Traceback (most recent call last):
2020-11-12_10:12:39.30402 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-12_10:12:39.30403 cursor, statement, parameters, context
2020-11-12_10:12:39.30407 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-12_10:12:39.30407 cursor.execute(statement, parameters)
2020-11-12_10:12:39.30415 sqlite3.OperationalError: database is locked
2020-11-12_10:12:39.30420
2020-11-12_10:12:39.30420 The above exception was the direct cause of the following exception:
2020-11-12_10:12:39.30421
2020-11-12_10:12:39.30424 Traceback (most recent call last):
2020-11-12_10:12:39.30449 File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
2020-11-12_10:12:39.30451 self.run()
2020-11-12_10:12:39.30456 File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
2020-11-12_10:12:39.30457 self._target(*self._args, **self._kwargs)
2020-11-12_10:12:39.30463 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 634, in _run_processor_manager
2020-11-12_10:12:39.30463 processor_manager.start()
2020-11-12_10:12:39.30469 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 875, in start
2020-11-12_10:12:39.30470 self._find_zombies() # pylint: disable=no-value-for-parameter
2020-11-12_10:12:39.30476 File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
2020-11-12_10:12:39.30476 return func(*args, **kwargs)
2020-11-12_10:12:39.30482 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 1325, in _find_zombies
2020-11-12_10:12:39.30485 LJ.latest_heartbeat < limit_dttm,
2020-11-12_10:12:39.30488 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3373, in all
2020-11-12_10:12:39.30488 return list(self)
2020-11-12_10:12:39.30494 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
2020-11-12_10:12:39.30494 return self._execute_and_instances(context)
2020-11-12_10:12:39.30501 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
2020-11-12_10:12:39.30501 result = conn.execute(querycontext.statement, self._params)
2020-11-12_10:12:39.30507 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
2020-11-12_10:12:39.30508 return meth(self, multiparams, params)
2020-11-12_10:12:39.30514 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
2020-11-12_10:12:39.30515 return connection._execute_clauseelement(self, multiparams, params)
2020-11-12_10:12:39.30520 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
2020-11-12_10:12:39.30521 distilled_params,
2020-11-12_10:12:39.30527 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
2020-11-12_10:12:39.30528 e, statement, parameters, cursor, context
2020-11-12_10:12:39.30534 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
2020-11-12_10:12:39.30534 sqlalchemy_exception, with_traceback=exc_info[2], from_=e
2020-11-12_10:12:39.30541 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
2020-11-12_10:12:39.30542 raise exception
2020-11-12_10:12:39.30554 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-12_10:12:39.30555 cursor, statement, parameters, context
2020-11-12_10:12:39.30565 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-12_10:12:39.30566 cursor.execute(statement, parameters)
2020-11-12_10:12:39.30583 sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
2020-11-12_10:12:39.30583 [SQL: SELECT task_instance.try_number AS task_instance_try_number, task_instance.task_id AS task_instance_task_id, task_instance.dag_id AS task_instance_dag_id, task_instance.execution_date AS task_instance_execution_date, task_instance.start_date AS task_instance_start_date, task_instance.end_date AS task_instance_end_date, task_instance.duration AS task_instance_duration, task_instance.state AS task_instance_state, task_instance.max_tries AS task_instance_max_tries, task_instance.hostname AS task_instance_hostname, task_instance.unixname AS task_instance_unixname, task_instance.job_id AS task_instance_job_id, task_instance.pool AS task_instance_pool, task_instance.pool_slots AS task_instance_pool_slots, task_instance.queue AS task_instance_queue, task_instance.priority_weight AS task_instance_priority_weight, task_instance.operator AS task_instance_operator, task_instance.queued_dttm AS task_instance_queued_dttm, task_instance.pid AS task_instance_pid,
task_instance.executor_config AS task_instance_executor_config
2020-11-12_10:12:39.30588 FROM task_instance JOIN job ON task_instance.job_id = job.id AND job.job_type IN (?)
2020-11-12_10:12:39.30588 WHERE task_instance.state = ? AND (job.state != ? OR job.latest_heartbeat < ?)]
2020-11-12_10:12:39.30589 [parameters: ('LocalTaskJob', 'running', 'running', '2020-11-12 10:07:34.282282')]
2020-11-12_10:12:39.30589 (Background on this error at: http://sqlalche.me/e/13/e3q8)
2020-11-12_10:12:43.33769 [2020-11-12 10:12:43,336] {dag_processing.py:673} WARNING - DagFileProcessorManager (PID=125) exited with exit code 1 - re-launching
2020-11-12_10:12:43.36596 [2020-11-12 10:12:43,364] {settings.py:55} INFO - Configured default timezone <Timezone [UTC]>[2020-11-12 10:12:43,353] {dag_processing.py:562} INFO - Launched DagFileProcessorManager with pid: 20962
2020-11-12_10:12:43.36685
2020-11-12_10:12:43.40635 [2020-11-12 10:12:43,406] {dag_processing.py:776} WARNING - Because we cannot use more than 1 thread (max_threads = 2) when using sqlite. So we set parallelism to 1.
```
We didn't change the default setting of max_threads (max_threads=2). Shall we set this parameter as 1 in default setting?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726562674
@kaxil : I think the main issue is why airflow frequently searches those dag examples in database? My understanding is that if we don't unpause a dag scheduler will skip it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-725681803
Thanks for opening your first issue here! Be sure to follow the issue template!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726222305
Hi @kaxil:
airflow version is 1.10.12
we use the default database
We don't know how to repeat it. The airflow scheduler was running correctly. We unpause one dag which is set to be executed daily. We got this error 8 hours after our dag was successfully executed.
Following are command we used to start the airflow scheduler:
`
airflow initdb
sed -i 's/\/root\/airflow\/logs/\/logs\/optimizer-dataplan-processing\/airflow-scheduler/g' /root/airflow/airflow.cfg
sed -i 's/sqlite:\/\/\/\/root\/airflow\/airflow.db/sqlite:\/\/\/\/data\/airflow.db/g' /root/airflow/airflow.cfg
airflow initdb
airflow scheduler
execution_date=$(date --date="yesterday" +"%Y-%m-%d")
airflow run -m our_dag task1 $execution_date
airflow run -m our_dag task2 $execution_date
airflow run -m our_dag task3 $execution_date
airflow run -m our_dag task4 $execution_date
airflow unpause our_dag
`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] eladkal commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-729634543
> @kaxil : I think the main issue is why airflow frequently searches those dag examples in database? My understanding is that if we don't unpause a dag scheduler will skip it.
Paused DAGs are skipped from scheduling but are still being parsed (entry created in the DB etc..)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb closed issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
ashb closed issue #12290:
URL: https://github.com/apache/airflow/issues/12290
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
ashb commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-785832386
SQLite is not recommended for anything beyond simple use cases.
Airflow 2.0.0 has changed the parsing process so that paused dags should not cause this behaviour any more.
Please upgrade and let us know if this problem persists. I'm going to close out this issue in the mean time, as I believe it is fixed by using a production suitable DB (postgres or mysql 8+ for instance).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ashb commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
ashb commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-740087688
> In addition, how can we remove all those dag examples? by setting load_examples as false in the configuration?
Yes
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] wentaowanguc commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
wentaowanguc commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726326892
Hi team: we got another similar error, here is the log info:
`2020-11-12_10:12:39.29731 Process ForkProcess-1:
2020-11-12_10:12:39.30395 Traceback (most recent call last):
2020-11-12_10:12:39.30402 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-12_10:12:39.30403 cursor, statement, parameters, context
2020-11-12_10:12:39.30407 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-12_10:12:39.30407 cursor.execute(statement, parameters)
2020-11-12_10:12:39.30415 sqlite3.OperationalError: database is locked
2020-11-12_10:12:39.30420
2020-11-12_10:12:39.30420 The above exception was the direct cause of the following exception:
2020-11-12_10:12:39.30421
2020-11-12_10:12:39.30424 Traceback (most recent call last):
2020-11-12_10:12:39.30449 File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
2020-11-12_10:12:39.30451 self.run()
2020-11-12_10:12:39.30456 File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
2020-11-12_10:12:39.30457 self._target(*self._args, **self._kwargs)
2020-11-12_10:12:39.30463 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 634, in _run_processor_manager
2020-11-12_10:12:39.30463 processor_manager.start()
2020-11-12_10:12:39.30469 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 875, in start
2020-11-12_10:12:39.30470 self._find_zombies() # pylint: disable=no-value-for-parameter
2020-11-12_10:12:39.30476 File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 74, in wrapper
2020-11-12_10:12:39.30476 return func(*args, **kwargs)
2020-11-12_10:12:39.30482 File "/usr/local/lib/python3.6/site-packages/airflow/utils/dag_processing.py", line 1325, in _find_zombies
2020-11-12_10:12:39.30485 LJ.latest_heartbeat < limit_dttm,
2020-11-12_10:12:39.30488 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3373, in all
2020-11-12_10:12:39.30488 return list(self)
2020-11-12_10:12:39.30494 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
2020-11-12_10:12:39.30494 return self._execute_and_instances(context)
2020-11-12_10:12:39.30501 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
2020-11-12_10:12:39.30501 result = conn.execute(querycontext.statement, self._params)
2020-11-12_10:12:39.30507 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
2020-11-12_10:12:39.30508 return meth(self, multiparams, params)
2020-11-12_10:12:39.30514 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
2020-11-12_10:12:39.30515 return connection._execute_clauseelement(self, multiparams, params)
2020-11-12_10:12:39.30520 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
2020-11-12_10:12:39.30521 distilled_params,
2020-11-12_10:12:39.30527 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
2020-11-12_10:12:39.30528 e, statement, parameters, cursor, context
2020-11-12_10:12:39.30534 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
2020-11-12_10:12:39.30534 sqlalchemy_exception, with_traceback=exc_info[2], from_=e
2020-11-12_10:12:39.30541 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
2020-11-12_10:12:39.30542 raise exception
2020-11-12_10:12:39.30554 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
2020-11-12_10:12:39.30555 cursor, statement, parameters, context
2020-11-12_10:12:39.30565 File "/usr/local/lib64/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
2020-11-12_10:12:39.30566 cursor.execute(statement, parameters)
2020-11-12_10:12:39.30583 sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
2020-11-12_10:12:39.30583 [SQL: SELECT task_instance.try_number AS task_instance_try_number, task_instance.task_id AS task_instance_task_id, task_instance.dag_id AS task_instance_dag_id, task_instance.execution_date AS task_instance_execution_date, task_instance.start_date AS task_instance_start_date, task_instance.end_date AS task_instance_end_date, task_instance.duration AS task_instance_duration, task_instance.state AS task_instance_state, task_instance.max_tries AS task_instance_max_tries, task_instance.hostname AS task_instance_hostname, task_instance.unixname AS task_instance_unixname, task_instance.job_id AS task_instance_job_id, task_instance.pool AS task_instance_pool, task_instance.pool_slots AS task_instance_pool_slots, task_instance.queue AS task_instance_queue, task_instance.priority_weight AS task_instance_priority_weight, task_instance.operator AS task_instance_operator, task_instance.queued_dttm AS task_instance_queued_dttm, task_instance.pid AS task_instance_pid,
task_instance.executor_config AS task_instance_executor_config
2020-11-12_10:12:39.30588 FROM task_instance JOIN job ON task_instance.job_id = job.id AND job.job_type IN (?)
2020-11-12_10:12:39.30588 WHERE task_instance.state = ? AND (job.state != ? OR job.latest_heartbeat < ?)]
2020-11-12_10:12:39.30589 [parameters: ('LocalTaskJob', 'running', 'running', '2020-11-12 10:07:34.282282')]
2020-11-12_10:12:39.30589 (Background on this error at: http://sqlalche.me/e/13/e3q8)
2020-11-12_10:12:43.33769 [2020-11-12 10:12:43,336] {dag_processing.py:673} WARNING - DagFileProcessorManager (PID=125) exited with exit code 1 - re-launching
2020-11-12_10:12:43.36596 [2020-11-12 10:12:43,364] {settings.py:55} INFO - Configured default timezone <Timezone [UTC]>[2020-11-12 10:12:43,353] {dag_processing.py:562} INFO - Launched DagFileProcessorManager with pid: 20962
2020-11-12_10:12:43.36685
2020-11-12_10:12:43.40635 [2020-11-12 10:12:43,406] {dag_processing.py:776} WARNING - Because we cannot use more than 1 thread (max_threads = 2) when using sqlite. So we set parallelism to 1.`
We didn't change the default setting of max_threads (max_threads=2). Shall we set this parameter as 1 in default setting?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on issue #12290: Got a sqlite3.OperationalError while runing airflow scheduler
Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #12290:
URL: https://github.com/apache/airflow/issues/12290#issuecomment-726337046
@wentaowanguc Sqlite should only be used for Local Development or testing. Otherwise, we strongly recommend at least using LocalExecutor with Postgres / MySQL instead of SQLite.
And for Production, I would recommend using CeleryExecutor -- If not Celery, at least please use LocalExecutor. And Postgres / MySQL as metadata DB.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org