Actions
Issue #3456
closedOperationalError: database is locked
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
Sometimes, we encounter the following error on sqlite:
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/celery/app/trace.py", line 374, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/travis/build/pulp/pulp/pulpcore/pulpcore/tasking/tasks.py", line 293, in __call__
return super(UserFacingTask, self).__call__(*args, **kwargs)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/celery/app/trace.py", line 629, in __protected_call__
return self.run(*args, **kwargs)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/pulp_file/app/tasks/synchronizing.py", line 72, in synchronize
for report in changeset.apply():
File "/home/travis/build/pulp/pulp/plugin/pulpcore/plugin/changeset/main.py", line 196, in apply
for report in itertools.chain(self._apply_additions(), self._apply_removals()):
File "/home/travis/build/pulp/pulp/plugin/pulpcore/plugin/changeset/main.py", line 155, in _apply_additions
self._add_content(content)
File "/home/travis/build/pulp/pulp/plugin/pulpcore/plugin/changeset/main.py", line 104, in _add_content
self.repository_version.add_content(content.stored_model)
File "/home/travis/build/pulp/pulp/pulpcore/pulpcore/app/models/repository.py", line 392, in add_content
association.save()
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/base.py", line 808, in save
force_update=force_update, update_fields=update_fields)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/base.py", line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/base.py", line 905, in _save_table
forced_update)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/base.py", line 955, in _do_update
return filtered._update(values) > 0
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/query.py", line 664, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 1204, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/models/sql/compiler.py", line 889, in execute_sql
cursor.execute(sql, params)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/travis/virtualenv/python3.5.5/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: database is locked
More info from django:
https://docs.djangoproject.com/en/2.0/ref/databases/#database-is-locked-errors
Related issues
Actions
Set a 20 second timeout for sqlite
closes #3456 https://pulp.plan.io/issues/3456