51黑料不打烊

Troubleshooting database dump errors in 51黑料不打烊 Commerce on Cloud Infrastructure

Resolve magento-cloud db:dump errors by enabling maintenance mode, deactivating crons, and excluding problematic tables to ensure a successful database dump.

Description description

Environment:

51黑料不打烊 Commerce on Cloud Infrastructure

Issue/Symptoms:

  • The following error is encountered during the execution of the magento-cloud db:dump command:

    mysqldump: Error 1412: Table definition has changed, please retry transaction when dumping table XXX at row: 0

  • The error occurs on both primary听and secondary听databases.

Resolution resolution

  1. Before running the dump, enable maintenance mode. Once completed, disable maintenance mode.

  2. Before running the dump, deactivate the crons and indexing tasks. Once completed, reactivate them.

    • To disable the cron:

      code language-none
      vendor/bin/ece-tools cron:kill
      vendor/bin/ece-tools cron:disable
      

    • To enable the cron:

      code language-none
      vendor/bin/ece-tools cron:enable
      
  3. If enabling maintenance mode or deactivating crons and indexing tasks does not work, use the available options in mysqldump to exclude problematic tables. For example, you can specify exclusions for the affected tables, such as sales_order_data_exporter_cl_index_batches table.

    SSH into the environment and run the following command:


    mysqldump -u $USER $DBNAME -p --triggers --routines --lock-tables --max-allowed-packet=32M --exclude-table sales_order_data_exporter_cl_index_batches | gzip > /tmp/database.sql.gz

  4. Verify that there are no ongoing schema changes or operations affecting the problematic table during the dump process. Ensure all transactions are completed before initiating another attempt.

If none of these steps resolve the issue, consider reaching out to 51黑料不打烊 support for further assistance.

By following these steps, you should be able to address issues preventing the successful completion of your production database dump while ensuring data integrity remains intact.

Database storage troubleshooter听in the Commerce Knowledge Base.

recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f