I just completed an upgrade similar to yours from 126.96.36.199 to 1.6.1. It took me about 10 hours to complete.
The database I upgraded has 20,000 skus and 15,000 orders and is over 1gb in size.
I ran into errors similar to what you are describing here probably 25-30 times. I kept reading where people would say “Revert to your backup, your database is corrupt.” They were saying just to start over. Well I tried that 7-8 times after 2-3 hours unsuccessful each time (this is in addition to the successful 9 hour upgrade!). Finally I found a thread that said it took them about 9 hours on a large database. I also found a few other tips saying that they had commented out some code to get their upgrade going again.
So, basically here is what I did to get upgraded to 1.6.1 successfully:
1. Created new installation of 1.6.1
2. Using SSH I navigated to existing 188.8.131.52 site and dumped a database. If you are unfamiliar with SSH . . . well with a large database it’s pretty much the only option, however, for your situation you should be fine.
2. Dropped all new tables in database and imported new database into test database again using SSH.
3. Opened site in a browser and watched the upgrade proceed. After about 20-30 minutes I would get a 503 error and my server would have some real issues keeping up (I am running on two dedicated servers each with 12gb ram, one for database and the other for files).
4. Restart the install by refreshing the page. This is almost always when I ran into the error you are describing here. What I believe is happening is it gets part way through an update script and then the server times out, crashes, or what have you.
5. Comment out code in the referenced file. Sometimes I had to try it a couple of different times.
6. Refresh browser and it would proceed. However, sometimes it would run for just a few seconds and get another error. When this happened I would then uncomment the code I had just commented out. Then, refresh the browser again. Usually, this would allow the install to happily proceed until once again 20-30 minutes later the server would hang, script crash, who knows. I tried to figure it out, but at the time I didn’t know if I was even making progress or wasting time.
7. Rinse and Repeat as needed.
8. One time I couldn’t get past an install script. It just kept giving me “table already exists”, “General error on rename”, “Can’t modify table”. I tried refreshing browser many times. Finally, I renamed script extension to something like “.extension.old.” and refreshed browser and again it started working. At next error I renamed script back and refreshed browser and it went along perfect.
Finally, after 9 grueling hours of this, the site pulled up!
Logged into backend and I reindexed everything, refreshed all caches, tested the front end, backend, etc. I did find a few errors.
So, then I downloaded the magento database repair script and ran my now upgraded 1.6.1 against a clean install 1.6.1 database. It found a few table errors. So, I let the repair script do it’s thing and then my most of my backend errors were fixed! I was able to disable a few extensions here and there that weren’t compatible with 1.6.1. I then requested new versions of the extensions from developers and spent some time changing class names to make them compatible with other extensions (this store has quite a few extensions).
Store is working perfectly now with just a few small minor bugs I’m working out today.
I had read in other threads people commented out code and it freaked me out! “Hey buddy you can’t just comment out core code!” But, the way I did it I commented and then uncommented and I was actually able to get past what seemed to be dead ends for others.
I believe you can also upgrade through SSH (instead of just visiting the site in a browser), but I was afraid of accidentally upgrading my other databases for other sites (I read in another thread that has happened to others). And, I’m a Noob with SSH so I drudged my way through the browser upgrade.
Hope that helps someone else! All I have to say is Magento should have more “if table already exists” then move on with modifying and adding columns and renaming junk. If the script hangs up part way through then you are going to get that error.