Skip Navigation

[Closed] Database Upgrate (Migrating Associations) Failed

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 14 replies, has 2 voices.

Last updated by Luo Yang 3 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1963731
Screenshot 2021-02-23 at 08.27.53.png
Screenshot 2021-02-23 at 08.27.41.png

Hi guys,
I'm trying to upgrade the database after the update and I get this error.
It is taking hours (I have 210,000 posts) - and ticks along nicely, but I left it over night to carry on and this error occurred.
Can you help please?

#1964979

Hello,

The problem you mentioned above is abnormal, did you get any PHP error logs?
please check these:
1) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again
2) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1965403

Thanks Luo,

It's going to be tricky to do that as such as it's a live site with lots of traffic, but I might be able to create a dev version of it without much of the content as it's too big to realistically duplicate as it is.

I have started the process again, with a blank error log, so I can check if there are any PHP errors whilst it runs.
I'll let you know how it gets on.

#1965609
Screenshot 2021-02-24 at 14.20.41.png

Same problem again, and no errors in my PHP log at all.
I'll restore it to a blank version if I can and test it.

#1966181

Can you provide your website database dump file?
Private message box enabled again

#1967591

I can download the file, will update here if find anything.

#1970193

I have tried your database dump file, it is quite large about 500M size, and there are lots of errors when I import it, for example:

ERROR 1231 (42000) at line 2177 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'time_zone' can't be set to the value of 'NULL'
ERROR 1231 (42000) at line 2179 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'sql_mode' can't be set to the value of 'NULL'
ERROR 1231 (42000) at line 2180 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'foreign_key_checks' can't be set to the value of 'NULL'
ERROR 1231 (42000) at line 2181 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'unique_checks' can't be set to the value of 'NULL'
ERROR 1231 (42000) at line 2182 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'character_set_client' can't be set to the value of 'NULL'
Query OK, 0 rows affected (0.000 sec)

ERROR 1231 (42000) at line 2184 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'collation_connection' can't be set to the value of 'NULL'
ERROR 1231 (42000) at line 2185 in file: 'F:\Downloads\tp_liveDB_57843234_2021-02-25_10-05-16.sql': Variable 'sql_notes' can't be set to the value of 'NULL'

It is not valid for debug, some WordPress tables are missing after import.

Please follow our document to make the duplicator package:
https://toolset.com/faq/provide-supporters-copy-site/
and you can follow Duplicator document to export database only package:
hidden link

Private message box enabled again.

#1971813

Thanks for the details, I am downloading the files, will update here if find anything

#1971879
migrate.JPG

I can install your duplicator package in my localhost, and it works fine in my localhost(fresh WP installation files + Toolset Types plugin), see my screenshot migrate.JPG.

There there are about 400K relationship connections in your website, it will take much time(about 3 hours) to migrate the relationships.

I suggest you follow our document to migrate the relationship in a fresh WP installation + the latest version of Toolset Types plugin:
https://toolset.com/faq/how-to-safely-update-the-database/

#1972005

Thanks Luo!

I will try again.

If I can't get the upgrade to work on my site with the plugins active, will it be acceptable to do as you have done and upgrade it on a fresh dev WP installation with only Types installed, then bring the database back into a Live environment? Or are there other factors?

PS. Just to add - did you manage to complete the upgrade? I get to around 65% or more and then it crashes.

#1972791
Screenshot 2021-03-02 at 21.04.47.png

Hi Luo,

I have managed to complete the upgrade!

Hurrah! It took 10 hours.

But - it's REALLY slowed my site down.
My homepage was taking a couple of seconds to load, but it's now taking aaages.

(Please see screenshot)

Toolset alone is taking between 8 and 11 seconds to do its queries. What's going on?
Nothing else has changed on the site other than this.

This seems like a massive backwards step if it's slowed down so much. What can I do to improve things?

#1972855
Screenshot 2021-03-02 at 21.22.43.png

I have taken a backup of the DB and rolled it back to as it was before. I cannot leave it live like that.

Please check out this screenshot as a comparison of how it is now and how it was prior to migration.

You can see the difference is enormous.

#1973179

Can you share the new upgraded databased dump file? private message box enabled again.
Or I have to wait for 10 hours to upgrade it in my localhost, thanks

#1981625

I can download the new files, will update here if find anything

#1983475

The database dump file is not valid for debug, I get a lots of MYSQL errors when import it, please follow below documents to make the new database dump files:

you can follow Duplicator document to export database only package:
hidden link

Thanks

The topic ‘[Closed] Database Upgrate (Migrating Associations) Failed’ is closed to new replies.