Managed to run the upgrade a second time, which appeared to complete successfully. 500 error message resolved.