Page becomes unresponsive whilst submitting a sales order

Page repeatedly becomes unresponsive when I tried submitting sales order. What might be the cause? I tried clearing the cache pre and post submission of a sales order. Please refer to the attached image and error report.


Error Report
Traceback (innermost last):
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/”, line 49, in application
response = frappe.handler.handle()
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/”, line 66, in handle
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/”, line 89, in execute_cmd
ret =, **frappe.form_dict)
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/”, line 531, in call
return fn(*args, **newargs)
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/core/doctype/notification_count/”, line 44, in get_notifications
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/model/”, line 154, in insert
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/model/”, line 202, in db_insert
), d.values())
File “/home/erpnext/webapps/digitales_testing/frappe-bench/apps/frappe/frappe/”, line 110, in sql
self._cursor.execute(query, values)
File “/home/erpnext/webapps/digitales_testing/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/erpnext/webapps/digitales_testing/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1205, ‘Lock wait timeout exceeded; try restarting transaction’)

Request Data
“type”: “POST”,
“args”: {
“cmd”: “frappe.core.doctype.notification_count.notification_count.get_notifications”,
“_type”: “POST”
“show_spinner”: false,
“url”: “/”

Response JSON

The transaction is timing out. You need to look at the defaulting query and index it.

try running show processlist while the save is in progress to identify the query.

Thanks rmehta, the problem was it was submitted from front end as the items of the Sales Order are in large volumes. it got resolved. thanks for the help