blazman
For now I would completely drop the failed upgrade database and re-import the previous one. Then I would check the webserver and PHP configurations like the request size limitations (PHP: post_max_size, upload_max_filesize, max_input_vars, max_multipart_body_parts | Apache: LimitRequestBody, LimitRequestFields, LimitRequestFieldSize, LimitRequestLine, RequestReadTimeout, and if it's a reverse proxy to FPM ProxyTimeout), all the different timeout settings (PHP: max_execution_time, max_input_time, default_socket_timeout, request_terminate_timeout and if using FPM the entire pm.* family | Apache: Timeout, KeepAliveTimeout), memory settings (PHP: memory_limit), etc. to increase to viable amounts as the default ones are quite small and can hinder the upgrade. Then I would completely restart the webserver and PHP-FPM and reattempt the upgrade.
Cheers.