Okay well I doubt its the upgrade script causing this on its own. It is the upgrade plus the fact your site traffic is so huge the added work is causing this.
There is no workaround here. You need to close your site to visitors as in turn off the gallery the forums etc anything to lessen your load so you can complete the upgrade.
You will need to go through the upgrade script in its entirety for every upgrade you need to run. Make sure to only run step 3 of the upgrade 4.85/486 script once.