Shopware 6 Background Queue Worker (Managed Server)

This article covers the management and configuration of the Shopware 6 Background Queue Worker at the “Managed” support level. If you ordered your Shopware server at the “Unmanaged” support level, please refer to the article: Setting Up the Shopware 6 Background Queue Worker (Unmanaged Server)


Shopware 6 uses so-called Message Queue Workers to process background tasks and recurring tasks. In the default configuration of Shopware 6, these are executed via the logged-in administrator in the browser. As soon as more than one administrator is logged in, these Message Queue Workers are executed multiple times, which can lead to very high CPU load and problems with PHP execution.



Introduction

Our Managed Shopware Servers offer graphical management of the Supervisor services, completely eliminating the need for configuration via SSH. Both the Message Queue Consumer Service and the Shopware Scheduled Tasks Service are automatically pre-installed by default.


Advantages of Supervisor vs. Systemd:

  • Centralized management of Supervisor programs via a configuration file
  • Simplified administration of the receivers to be executed
  • Easy adjustment of the number of processes per receiver
  • Support for automated deployment via pipeline



Customizing Shopware Background Services

To make adjustments to the background services, go to the creoline Customer Center at account.creoline.com, navigate to the “Server” menu item via the sidebar, and select the appropriate server.


Select the Configuration Files tab:


You can customize the desired service using the Edit button:


Configuration Options

Parameter Value Description
numprocs 1 - 99 Number of parallel worker processes
command (Receivers) async failed low_priority Specifies the receivers to be processed
user <systemuser> SSH username of the Shopware instance owner


Next, make the desired adjustments to the corresponding service and save them by clicking the Save Changes button.


A new version of your configuration is automatically generated in the background, so you can restore previous versions at any time.


The underlying Systemd service will then automatically restart to apply your changes immediately.



Frequently Asked Questions

How can I configure more than one Message Queue Consumer process if the numprocs parameter does not exist?

We’d be happy to set up the latest Message Queue Consumer process for you based on supervisor. Simply contact our support team and coordinate the desired configuration with us.

When submitting a request, please always include your store domain or the corresponding Plesk subscription.



How can I add another receiver to the Message Queue Consumer process?

To add another receiver, you can append the desired receiver after the pre-installed receivers async and failed.


Example configuration:

[..] bin/console messenger:consume async failed new_receiver [..]



The “Configuration Files” tab isn’t displayed on my Shopware server—what should I do?

If the tab isn’t displayed on your Shopware server, the Background Queue Systemd service was implemented using older technology. We’d be happy to set up the module for you retroactively so you can take advantage of the graphical interface.

When submitting a request, please always include the shop domain or the corresponding Plesk subscription.



How can I check the status of my message queue?

The standard output of the Shopware Consumer process can be viewed using the following command:

cat /var/log/supervisor/shopware-consumer.log

To monitor the output, use the following command:

tail -f /var/log/supervisor/shopware-consumer.log