Shopware 6 - Worker
Shopware 6 is based on Symfony, that should be known to all of us already.
In the article I explain to you that in Shopware 6 tasks are created and how they are processed.
Explanation of the task control
Compared to Shopware 5, we have a the task control control here
As an example I take here the Cache Warmer.
In Shopware 5,
bin/console sw:cache:warm was executed and the process itself then performed the warm-up.
In Shopware 6, the
bin/console http:cache:warm:up command creates task blocks for the worker to warm up the cache. In this Blackfire trace, we can see what happens:
The command created
messages . The messages are stored in the
In our case, it looks like this:
Processing the messages
All entries in this table are processed by workers, these are created automaticly in the backend. ¹
Probably this was the easiest way for Shopware, but in practice some massive performance problems occur.
Shopware does not pay attention in any way that not too many workers are active.
If there are a lot of messages, then these are completely shot through without regard to losses.
This has logically to the consequence:
- Overload of the server
- Store functionality is limited/not accessible
That's sucked. :/
Conversion of the workers
However, there is fortunately the possibility to run the workers in the background.
I recommend doing the conversion on every store.
It has practically already burned servers through it (with this Bug) and even so, I regularly see managed servers that were completely overloaded and customers wondered why the store no longer went.
- Symfony documentation:
- Shopware documentation:
- Photo by Juri Noga