We switched the mailman database from sqlite to postgresql a while back to minimize any database locking but I'm seeing a lot of errors for the django sqlite database. Is it possible to move that to postgres as well?
16:18:39 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:39 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:39 [Q] INFO Process-1:4 processing [compute_thread_positions]
16:18:39 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:39 [Q] INFO Processed [compute_thread_positions]
16:18:44 [Q] INFO Process-1:2 processing [compute_thread_positions]
16:18:44 [Q] INFO Processed [compute_thread_positions]
16:18:44 [Q] INFO Process-1:1 processing [compute_thread_positions]
16:18:44 [Q] INFO Processed [compute_thread_positions]
16:18:44 [Q] INFO Process-1:3 processing [compute_thread_positions]
16:18:44 [Q] INFO Process-1:4 processing [compute_thread_positions]
16:18:44 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:44 [Q] INFO Processed [compute_thread_positions]
16:18:49 [Q] INFO Process-1:2 processing [compute_thread_positions]
16:18:49 [Q] INFO Process-1:1 processing [compute_thread_positions]
16:18:49 [Q] INFO Process-1:3 processing [compute_thread_positions]
16:18:49 [Q] INFO Process-1:4 processing [compute_thread_positions]
16:18:49 [Q] INFO Process-1:2 processing [compute_thread_positions]
16:18:49 [Q] INFO Process-1:1 processing [compute_thread_positions]
16:18:49 [Q] INFO Processed [compute_thread_positions]
16:18:49 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:49 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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
16:18:49 [Q] INFO Processed [compute_thread_positions]
16:18:49 [Q] INFO Processed [compute_thread_positions]
16:18:49 [Q] INFO Processed [compute_thread_positions]
16:19:39 [Q] INFO Process-1:4 processing [compute_thread_positions]
16:19:39 [Q] INFO Process-1:3 processing [compute_thread_positions]
16:19:39 [Q] INFO Process-1:1 processing [compute_thread_positions]
16:19:39 [Q] ERROR Failed [compute_thread_positions] - database is locked : Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 383, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_q/cluster.py", line 421, in worker
res = f(*task["args"], **task["kwargs"])
File "/usr/lib/python3/dist-packages/hyperkitty/tasks.py", line 127, in _compute_thread_positions
compute_thread_order_and_depth(thread)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 55, in compute_thread_order_and_depth
walk_successors(thread.starting_email.id)
File "/usr/lib/python3/dist-packages/hyperkitty/lib/analysis.py", line 40, in walk_successors
obj.save(update_fields=["thread_depth", "thread_order"])
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 743, in save
self.save_base(using=using, force_insert=force_insert,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 780, in save_base
updated = self._save_table(
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 853, in _save_table
updated = self._do_update(base_qs, using, pk_val, values, update_fields,
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 903, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 760, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1471, in execute_sql
cursor = super().execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-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