MariaDB or PostgreSQL ??
MariaDB
I am having similar issue on my instance and here is what i found in the error log
Title
submit_in_background_job
Error
Traceback (most recent call last):
File “/opt/bench/xlevel/apps/frappe/frappe/utils/background_jobs.py”, line 100, in execute_job
method(**kwargs)
File “/opt/bench/xlevel/apps/posawesome/posawesome/posawesome/api/posapp.py”, line 613, in submit_in_background_job
invoice_doc.submit()
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 918, in submit
self._submit()
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 907, in _submit
self.save()
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 285, in save
return self._save(*args, **kwargs)
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 336, in _save
self.update_children()
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 366, in update_children
self.update_child_table(df.fieldname, df)
File “/opt/bench/xlevel/apps/frappe/frappe/model/document.py”, line 375, in update_child_table
d.db_update()
File “/opt/bench/xlevel/apps/frappe/frappe/model/base_document.py”, line 386, in db_update
), list(d.values()) + [name])
File “/opt/bench/xlevel/apps/frappe/frappe/database/database.py”, line 147, in sql
self._cursor.execute(query, values)
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 170, in execute
result = self._query(query)
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/cursors.py”, line 328, in _query
conn.query(q)
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/connections.py”, line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/connections.py”, line 732, in _read_query_result
result.read()
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/connections.py”, line 1075, in read
first_packet = self.connection._read_packet()
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/connections.py”, line 684, in _read_packet
packet.check_error()
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/protocol.py”, line 220, in check_error
err.raise_mysql_exception(self._data)
File “/opt/bench/xlevel/env/lib/python3.6/site-packages/pymysql/err.py”, line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1213, ‘Deadlock found when trying to get lock; try restarting transaction’)
Start a new thread!