Avada Forums Community Forum Solution: Avada Theme Upgrade – Server Timeout 502 Error – WP-ENGINE

Viewing 1 post (of 1 total)
  • Author
    Posts
  • JoshWolfenberg
    Participant
    Post count: 4

    I’m posting this for anyone that might run into this in the future. Best of luck! 🙂

    Overview:
    This solution is to assist with a server timeout and 502 error when attempting to upgrade Avada Theme, Avada Core, and Avada Builder.

    The Cause of the issue:
    The cause of this issue was two-fold: an abundance of Transients in our database and a bloated database with unnecessary entries. Transients are a normal part of the WordPress ecosystem, used by themes and plugins for temporary data caching. Normally there are no issues, however, transients become problematic when a theme or plugin does not delete them as expected, resulting in a bloated database.

    During an Avada upgrade, Avada adds/removes/clears its own transient data in the database, and, if there are too many entries in the database, the server crashes and produces a 502 error.

    The Solution:

    **Always create a backup of your website and database prior to anything**

    • We began exploring our MySQL database to see the current state of transients. During this process, we discovered a massive amount of _wp_session entries in our wp_options table (3.6 MILLION entries!). A custom plugin created these, and we think this was slowing down the database and preventing the smooth operation of the Avada upgrade process.
    • We deleted all 3.6 MIL entries using the MySQL commands below.
    • Next, we used the Delete Expired Transients plugin to delete any remaining transients on our site.
    • Then, we ran Avada > Options > Performance > Reset Avada Caches.
    • Then, we upgraded Avada Theme, Avada Core, and Avada Builder, and everything went smoothly!

      MySQL Commands:

      First, check for entries:

      SELECT * 
      FROM <code>wp_options</code> 
      WHERE <code>option_name</code> LIKE '_wp_session_%'

      Then, when you feel confident, delete those entries:

      DELETE FROM 'wp_options'
      WHERE 'option_name' LIKE '_wp_session_%'
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.