V14 Stuck at Migration

I was trying to import v13 into v14 productions. everything was good but after importing the database when i run bench --site [sitename] migrate it get stuck at following step no error or anything else.
Executing erpnext.patches.v14_0.migrate_remarks_from_gl_to_payment_ledger in demo (_3cbf127f0870293e)

i tried bench update --reset but stuck at the same step it get stuck.
my server has 8gb of ram and waited for more than an hour but no luck …

As long as there are no errors, the script might still be running.
Maybe trying migrating overnight?

1 Like

the database i am trying to import contains only customers and items very small amount of data, dont know why it taking too much time. have you tried importing a database in v14.

This is the patch you’re having issue with: erpnext/migrate_remarks_from_gl_to_payment_ledger.py at develop · frappe/erpnext · GitHub

Open the file on your server and make changes on line 62-66 as shown below.

		if pl_entries:
			print(f"Total runs required: {len(pl_entries)/1000} ")
			i = 0
			# split into multiple batches, update and commit for each batch
			batch_size = 1000
			for batch in create_batch(pl_entries, batch_size):
				i += 1
				print(f"Current run: {i}")
				for entry in batch:

Try migrating now, it should show the count on screen.

1 Like

This file should be in app folder right?

apps/erpnext/erpnext/patches/v14_0/migrate_remarks_from_gl_to_payment_ledger.py

1 Like

i am working on production server. i have this file. it ends on line 56 can you suggest edit for this file

i have edit this file from line from 33 to 41 as you suggested but no luck

37-41

Also, run bench restart for the changes to come into effect

1 Like

no success

I have same issue.I have followed @rtdany10 suggestion without solution.Were you able to solve the problem?