Synchronization does not start

In a functioning Shopware 6 installation, this step should already have been completed, but it must be ensured that the scheduled tasks and the message queue are processed accordingly.

Message queue

The following command should be called:

bin/console messenger:consume async --time-limit=60

Further information can be found here: https://symfony.com/doc/current/messenger.html#deploying-to-production and https://developer.shopware.com/docs/guides/hosting/infrastructure/message-queue#execution-methods

Scheduled Tasks

The following command should be called for scheduled tasks:

bin/console scheduled-task:run

If synchronization still does not start, check the following steps:

  1. In the database table scheduled_task, there are four tasks that have been registered by the plugin:
  • jett.mc_ecommerce.purge_log
  • jett.mc_ecommerce.subscriber_sync
  • jett.mc_ecommerce.stats_task
  • jett.mc_ecommerce.sync_task

Ideally, all tasks should be set to scheduled. If this is not the case and one of the tasks is set to failed, for example, check the database table messenger_messages to see if there are any messages that have been registered in the failed queue. If this is the case, error messages can be found here in the body or header column.

The status of the task should then be set back to scheduled. The next time the task is executed, you can check whether it still fails.

If, for example, the next_execution_date of the task in the scheduled_task table is in the past, the task may not be executed. This may be due to #2.

  1. If this does not help, it is very likely that the execution time of the tasks is too long and the tasks at the top are not executed at all or are aborted by the server. There are two possible solutions:
  • The max_execution_time of the CLI PHP process should be checked and increased if necessary.
  • The synchronization limit in the plugin settings can be reduced from 500 (default) to keep the execution time lower.