Try ERPNext Buy Support Partners Foundation

Lock wait timeout exceeded; try restarting transaction create and delete

It’s not always happening. But I am getting this message Another transaction is blocking this one. Please try again in a few seconds. frequently and need submit until operation done.

In browser console I got following error:

Traceback (innermost last):
  File "/home/myserver/frappe-bench/apps/frappe/frappe/app.py", line 69, in application
    response = frappe.handler.handle()
  File "/home/myserver/frappe-bench/apps/frappe/frappe/handler.py", line 20, in handle
    execute_cmd(cmd)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/handler.py", line 37, in execute_cmd
    ret = frappe.call(method, **frappe.form_dict)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/__init__.py", line 801, in call
    return fn(*args, **newargs)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/desk/reportview.py", line 134, in delete_items
    frappe.delete_doc(doctype, d)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/__init__.py", line 568, in delete_doc
    ignore_permissions, flags)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 75, in delete_doc
    delete_linked_comments(doc)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 204, in delete_linked_comments
    ignore_permissions=True)
  File "/home/frappe/bekredito/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 95, in delete_doc
    frappe.defaults.clear_default(parenttype="User Permission", key=doctype, value=name)
  File "/home/myserver/frappe-bench/apps/frappe/frappe/defaults.py", line 167, in clear_default
    tuple(values))
  File "/home/myserver/frappe-bench/apps/frappe/frappe/database.py", line 135, in sql
    self._cursor.execute(query, values)
  File "/home/myserver/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/myserver/frappe-bench/env/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
 OperationalError: (1205, 'Lock wait timeout exceeded; try restarting transaction')

How can i overcome this issue?