• Resolved QinisoM

    (@qinisom)


    I’m struggling to resolve the error message “Database optimization did not complete successfully. We recommend restoring the original database or try again.”

    When I click on the “try again” link, I see this ajax request

    curl -X POST 'https://xxx.com/wp-admin/admin-ajax.php' \
    --data-raw 'action=trp_update_database&trp_updb_nonce=hgbggjhfjgh&initiate_update=true'

    and this query paginated query in MySQL:

    SELECT
    tt.id, CASE WHEN ot.original is NULL THEN tt.original ELSE NULL END as tt_original,
    tt.translated,
    tt.domain AS tt_domain,
    tt.plural_form,
    tt.original_id AS tt_original_id,
    ot.original,
    ot.domain,
    ot.context
    FROM
    wp_trp_gettext_en_us AS tt
    LEFT JOIN wp_trp_gettext_original_strings AS ot ON tt.original_id = ot.id LIMIT 100, 50

    The query keeps running in even after the ajax request has failed with a 504.

    I tried to modify the query to debug as it seemed to have an exponentially increasing the page size such these limit clause instances:

    ... LIMIT 9550, 9600
    ... LIMIT 19550, 19600

    After all these attempts to debug, I’m not seeing any related error in the logs.

    I would appreciate assistance from a team member.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Anca

    (@ancavictoria)

    Hello @qinisom

    Thank you for the information provided and for bringing this to our attention!

    We have identified what may be causing the described issue and will be addressing it in the next update.
    In the meantime, you can try increasing the max_execution_time in PHP as a temporary workaround.

    I will notify you once the fix is available – thank you for your understanding and patience!

    Kind regards,

    Anca

    Thread Starter QinisoM

    (@qinisom)

    Hi Anca, and thank you for the speedy response.

    I would also like to point out that the non-paginated version of the above query

    SELECT
    tt.id, CASE WHEN ot.original is NULL THEN tt.original ELSE NULL END as tt_original,
    tt.translated,
    tt.domain AS tt_domain,
    tt.plural_form,
    tt.original_id AS tt_original_id,
    ot.original,
    ot.domain,
    ot.context
    FROM wp_trp_gettext_en_us AS tt
    LEFT JOIN wp_trp_gettext_original_strings AS ot ON tt.original_id = ot.id

    can return a very large results set, I would suggest that this be removed and only the paginated version is used.

    Kind regards.

    • This reply was modified 2 weeks ago by QinisoM.
    Plugin Support Anca

    (@ancavictoria)

    Hello @qinisom

    I can confirm that I have forwarded this to our development team as well.
    I will notify you once the fix is available – thank you for your patience!

    Kind regards.

    Anca

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.