Consent to the use of Personal Data and Cookies

This website needs your consent to use cookies in order to customize ads and content.

If you give us your consent, data may be shared with Google.

Worker stopped due to time limit of x exceeded

Running messenger:consume workers with a time limit can be useful, but you should also not set it too low.


By. Jacob

Edited: 2022-11-11 02:00

10:09:14 INFO [messenger] Worker stopped due to time limit of 300s exceeded
  "timeLimit" => 300

This happens when you run a messenger:consume worker with a time limit like --time-limit=1800.

You do not have to worry about messages not being handled properly, since the time limit parameter specifically makes sure that the currently processing message finishes before the worker is stopped.

You should use supervisor, or a similar tool, to handle your messenger:consume workers, because then you can make them automatically restart when stopped.

Running messenger:consume or scheduled-task:run from cron is not recommended, as it they will be harder to manage.

Shopware messenger:consume settings

Shopware uses the Symfony Messenger component, and Shopware 6 recommends PHP at least has 512MB available memory, so you should consider starting your workers with a minimum of 512MB, and perhaps even more, since your workers should not normally reach the memory limit. But it may be nice with some leverage, so running with 1024MB probably does no harm.

If you are experiencing problems running your workers, it can sometimes help to run an extra worker with the -vvv option in order to see potential errors live in a terminal:

sudo -u www-data bin/console messenger:consume --memory-limit=1024M --time-limit=1800 -vvv

Tell us what you think:

  1. This error is usually nothing to worry about. It tends to happen when losing internet connectivity.
  2. Undefined array key password doing installation of Shopware using the web installer.
  3. How SEO URLs work in Shopware, and how to customize them.
  4. How to disable certain Exception error messages in Shopware, so that redundant messages do not show up in the log file.

More in: Shopware