DB error executing 'update_job' (database is locked). Retrying with a new DB connection...
clownf opened this issue · 5 comments
Describe the bug
DB error executing 'update_job' (database is locked). Retrying with a new DB connection...
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Traceback
Traceback (most recent call last):
File "/home/clownf/.local/lib/python3.8/site-packages/django_apscheduler/util.py", line 99, in func_wrapper
result = func(*args, **kwargs)
File "/home/clownf/.local/lib/python3.8/site-packages/django_apscheduler/jobstores.py", line 258, in update_job
db_job.save()
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 99, in execute
return super().execute(sql, params)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/utils.py", line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/home/clownf/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: database is locked
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
- OS: ubuntu 20.04
- Browser [e.g. Chrome 67]
- Python Version 3.8.10
- Gerapy Version 0.9.10
Additional context
Add any other context about the problem here.
兄弟我也遇到这个问题有没有解决方法?
兄弟我也遇到这个问题有没有解决方法?
暂时还没有,已准备自己写爬虫框架了
使用其它类型的数据库,不要使用默认的sqlite。我换成mysql后,就没有这个问题了
使用其它类型的数据库,不要使用默认的sqlite。我换成mysql后,就没有这个问题了
你好,请问你如何配置的
使用其它类型的数据库,不要使用默认的sqlite。我换成mysql后,就没有这个问题了
你好,请问你如何配置的
我早就换成 qinglong 更先进的技术, 非常稳定又可以自动拉取 github 的爬虫项目。