Stuck on executing patches on update-- migrate timeout

Got Stuck on Executing erpnext.patches.v8_10.update_gl_due_date_for_pi_and_si in erpdev (16071df12be8ddd4)

on migrate – and then pymysql.err.InternalError: (1205, u'Lock wait timeout exceeded; try restarting transaction')

Now site is stuck on updating… it was flawless update on staging side but now live site is stuck …
Please help…how to turn of updating.

Did a reset to head , and attempted migrate again.
Stuck on updating docs for erpnext and the above timeout error.

Can someone plz help.


Did a temporary solution –
Rolled back the Pull.
opened bench mysql to see what process was timing out then killed it
bench mysql
did migrate again worked.

Gonna try and update again later after working hours,

How can i skip a particular patch ? or how can i prevent it from getting stuck on the same patch … because it is a live system with a lot of gl entries it is getting stuck i suppose,

Any alternative?

You can skip a patch by commenting out the line in patches.txt.

However, you should atleast share the trace so that we solve the issue.

1 Like

thanks @netchampfaris ,
There isn’t any trace --it just takes forever on this patch , like for 3-4 hours then timeout exceeded error and done.

When i recently did it -i was constantly checking the mysql process list to see whats taking so long…
what i saw were 2 threads running constantly alternatively.

State: Sorting result
Info: select voucher_no from tabGL Entry where ifnull(due_date, ‘’) = “” and ifnull(party, ‘’) != “” and
Progress: 0.000
2 rows in set (0.00 sec)

Command: Sleep
Time: 0
Info: NULL
Progress: 0.000
2 rows in set (0.00 sec)

and in starting others such as desc salesInvoice ,desc GLentry but mostly the first one.

I believe the sorting takes forever because of large database size.

Thanks for the response.