Support

Account

Home Forums Backend Issues (wp-admin) "Database Upgrade Required" won't go away Reply To: "Database Upgrade Required" won't go away

  • I think I’ve figured this out, at least in the failing situation on my installation.

    In the browser, all I see is that the POST request to admin-ajax.php returns a 500 status after about 12 seconds.

    I added logging to the plugin and noticed that it died fairly consistently while processing one of the last taxonomies. (I have a lot of them, with a lot of terms in each.) I narrowed that down to getting no output after the get_terms() call, so I added a try/catch block around it to see if it was throwing an exception.

    error_log(‘Getting terms for taxonomy ‘.print_r($taxonomy->name, true));
    // vars
    try {
    $terms = get_terms($taxonomy->name, array( ‘hide_empty’ => false ));
    } catch(Exception $e) {
    error_log(print_r($e, true));
    }
    error_log(‘Got terms for taxonomy ‘.print_r($taxonomy->name, true));

    There was no log from the exception, which made me wonder if the failure was due to a timeout. Sure enough, if I limited the update to skip the successful taxonomies and update only those that hadn’t been done, the plugin completed successfully and the notice disappeared.

    Perhaps the ACF update process could perform the database updates over a series of requests, and include logging (ideally in the browser and the PHP log) to show the progress and/or any failures.