Skip Navigation

[Escalated to 2nd Tier] Database Upgrade – an error has occurred during the upgrade.

This support ticket is created 4 years, 1 month 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 30 replies, has 3 voices.

Last updated by Nigel 3 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1825865

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you. Our Devs are doing investigation and I will get back to you as soon as I get any updates on it.

You should just ignore the Database Upgrade notice for now if you see any.

#1861357

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

We just release the new version for Toolset plugins including Types 3.4.3 that should address the issue.

We always recommend running your site with the latest stable release plugin version.

*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest officially released version. You can download the latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

#1861403

Max

Hi Minesh
Thank you for update.
I have updated Types and Blocks to the current version.
I will run the database update again and report the results.

#1861409

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Great - thanks.

Please do not forget to take backup of your database before you run the update.

#1863435

Max

Hi Minesh
Finally, after two days, the update process is complete. But the news is not good. Again, a white screen and a 500 error on pages that use relationships ... What are my next steps?

#1863749

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Do you see anything with your error logs? if yes - Can you please share that with us.

#1863887

Max

I see no errors, only long page load that uses relationships.
If I remove View from content template , the page loads as quickly as it did before the upgrade.
Same story as before:
https://toolset.com/forums/topic/database-upgrade-an-error-has-occurred-during-the-upgrade/#post-1824469
i need more research from you please

#1864377

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Max

I checked with the developers and they no longer have a copy of your site for testing, and I see that the link for the copy of your database has expired.

Could I trouble you to provide an updated link?

#1864397

Max

Hi Nigel
Thank you for staying with me.
Here is a new link to the database.
hidden link
Unfortunately, I could not make a backup using a duplicator due to the size of the database. Therefore this is only a dump of the database. The plugins I am using are Types and Blocks. The active theme is clean, based on Underscores.

I forgot to clarify an important aspect. In Сontent template
hidden link
I have commented out the "problematic" view [wpv-view name="boi-boica"] that is causing the slowdown.

#1864401

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thank you Max, I've shared that with the developer.

Are there some particular pages that we should be checking, where relationships are being used and causing the problem?

#1864415

Max

Thanks for the quick response.
I have updated my previous post with updated information.
Pages that take a long time to load are: all single "fighter" pages, for example
hidden link
hidden link
To prevent the site from causing overload, I commented on the live site view [wpv-view name="boi-boica"]
This is a paginated view, optimized and very fast loading until the recent multilingual relationship update.
I hope this information will be useful to you and narrow down your search.

#1879185

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hello again Max

The developer made quite a few optimisations to the database queries based upon profiling what was happening on your site that should make an appreciable difference. I am reluctant to suggest this is fixed given what's happened so far, but can we try again and see how it compares?

You may need to use the Check for Updates button to see the updates, or they are available from toolset.com/account/downloads

Let me know how it goes.

#1880311

Max
after.png
before.png

Hello Nigel
Thanks for the news and work on optimization.
The process of updating the database is now complete. I have also updated the plugins to the latest version.
I confirm that there are improvements over the previous version of Toolset Blocks and Types. There is no more white screen, the page is loading completely. But ...It still loads more slowly than before the database update.
I did some tests and here's what I found.

Before updating the database (Toolset needs to update the database. This will take a few minutes to complete...), same page (data from Query Monitor):
hidden link

0,24 sec load time, no slow queries (before.png)

After updating the database:
1,49 sec load time, 11 slow queries from toolset blocks (before.png)

For example

SELECT DISTINCT wp_toolset_connected_elements_2.element_id AS selected_child_id
FROM wp_toolset_associations AS associations JOIN wp_toolset_relationships AS relationships
ON ( associations.relationship_id = relationships.id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_1
ON ( associations.parent_id = wp_toolset_connected_elements_1.group_id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_2
ON ( associations.child_id = wp_toolset_connected_elements_2.group_id )
WHERE ( associations.relationship_id = 2 )
AND ( ( wp_toolset_connected_elements_1.element_id IN ( 77144 ) ) )
AND ( ( ( 1 = 1 )
AND ( 1 = 1 )
AND ( 1 = 1 ) ) )
AND ( relationships.is_active = 1 )
LIMIT 9223372036854775807 OFFSET 0
SELECT DISTINCT wp_toolset_connected_elements_2.element_id AS selected_parent_id
FROM wp_toolset_associations AS associations JOIN wp_toolset_relationships AS relationships
ON ( associations.relationship_id = relationships.id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_1
ON ( associations.child_id = wp_toolset_connected_elements_1.group_id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_2
ON ( associations.parent_id = wp_toolset_connected_elements_2.group_id ) JOIN wp_toolset_type_sets AS wp_toolset_type_sets_1
ON ( wp_toolset_type_sets_1.set_id = relationships.parent_types )
WHERE ( associations.relationship_id = 1 )
AND ( wp_toolset_connected_elements_1.element_id = 860732 )
AND ( ( relationships.parent_domain = 'posts' )
AND ( wp_toolset_type_sets_1.type = 'event' ) )
AND ( ( ( 1 = 1 )
AND ( 1 = 1 )
AND ( 1 = 1 ) ) )
AND ( relationships.is_active = 1 )
LIMIT 1 OFFSET 0
SELECT DISTINCT wp_toolset_connected_elements_2.element_id AS selected_parent_id
FROM wp_toolset_associations AS associations JOIN wp_toolset_relationships AS relationships
ON ( associations.relationship_id = relationships.id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_1
ON ( associations.child_id = wp_toolset_connected_elements_1.group_id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_2
ON ( associations.parent_id = wp_toolset_connected_elements_2.group_id ) JOIN wp_toolset_type_sets AS wp_toolset_type_sets_1
ON ( wp_toolset_type_sets_1.set_id = relationships.parent_types )
WHERE ( associations.relationship_id = 3 )
AND ( wp_toolset_connected_elements_1.element_id = 860732 )
AND ( ( relationships.parent_domain = 'posts' )
AND ( wp_toolset_type_sets_1.type = 'fighter' ) )
AND ( ( ( 1 = 1 )
AND ( 1 = 1 )
AND ( 1 = 1 ) ) )
AND ( relationships.is_active = 1 )
LIMIT 1 OFFSET 0
SELECT DISTINCT wp_toolset_connected_elements_2.element_id AS selected_parent_id
FROM wp_toolset_associations AS associations JOIN wp_toolset_relationships AS relationships
ON ( associations.relationship_id = relationships.id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_1
ON ( associations.child_id = wp_toolset_connected_elements_1.group_id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_2
ON ( associations.parent_id = wp_toolset_connected_elements_2.group_id ) JOIN wp_toolset_type_sets AS wp_toolset_type_sets_1
ON ( wp_toolset_type_sets_1.set_id = relationships.parent_types )
WHERE ( associations.relationship_id = 3 )
AND ( wp_toolset_connected_elements_1.element_id = 463087 )
AND ( ( relationships.parent_domain = 'posts' )
AND ( wp_toolset_type_sets_1.type = 'fighter' ) )
AND ( ( ( 1 = 1 )
AND ( 1 = 1 )
AND ( 1 = 1 ) ) )
AND ( relationships.is_active = 1 )
LIMIT 1 OFFSET 0
SELECT DISTINCT wp_toolset_connected_elements_2.element_id AS selected_parent_id
FROM wp_toolset_associations AS associations JOIN wp_toolset_relationships AS relationships
ON ( associations.relationship_id = relationships.id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_1
ON ( associations.child_id = wp_toolset_connected_elements_1.group_id ) JOIN wp_toolset_connected_elements AS wp_toolset_connected_elements_2
ON ( associations.parent_id = wp_toolset_connected_elements_2.group_id ) JOIN wp_toolset_type_sets AS wp_toolset_type_sets_1
ON ( wp_toolset_type_sets_1.set_id = relationships.parent_types )
WHERE ( associations.relationship_id = 1 )
AND ( wp_toolset_connected_elements_1.element_id = 778303 )
AND ( ( relationships.parent_domain = 'posts' )
AND ( wp_toolset_type_sets_1.type = 'event' ) )
AND ( ( ( 1 = 1 )
AND ( 1 = 1 )
AND ( 1 = 1 ) ) )
AND ( relationships.is_active = 1 )
LIMIT 1 OFFSET 0

etc.

I also noticed that the view caches requests when the page is accessed again, which is great, but I certainly want to improve the first page load.

What is the situation on the site now: all plugins are up to date, but the database is not up to date (Toolset needs to update the database. This will take a few minutes to complete...)
Everything works fine as before .. But I understand that I cannot ignore update reminder always.

I hope this information will help you in further research.

#1880343

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, it looks like we are getting closer.

The lead developer wants to go through your site to examine those queries to see what can be done. It may be that the code is well optimised but that updating some settings would help for example, or it may reveal some other places in the code we can make further improvements.

Could I trouble you again for a dump of the database, this time the version you are now testing after the successful migration?

You can just share a link in your next reply, such links are automatically private.

#1880353

Max

Of course
hidden link