Out of memory crash during Initial Asset Database refresh

Updating HDRP version requires updating all materials (See: https://docs.unity3d.com/Packages/c…h-definition@8.2/manual/Material-Upgrade.html). This process seem to load every asset, why is this not done in batches? During this the editor crashed. Now when I try to reopen the editor It keeps repeating this process and crashes the editor while eating up all memory.

Does anyone know how to fix reimporting assets? Removing all the assets from the project and re-adding them seem like a bad idea due to loss of links and references and would take weeks or months to repair.

I am using unity version 2021.1.16f1

fyi, I increased virtual memory on the system to 200GB, 200GB! And it finally seem to go through, that is insane…

It crashed again during the update that I initiated from the hd render pipeline wizard. After the editor got through the “initial asset database refresh” and I loaded a scene, all models were either pink or looked weird, so I followed advice to enter the wizard and click “Upgrade Project material to hd materials”. The editor crashed again with out of memory, saying it tried to allocate 264GB of memory.