5 minutes to read

Q&As on Benjamin Eberlei's tech stage talk for SCD 2021

Q&As on Benjamin Eberlei's tech stage talk for SCD 2021

At last year's Shopware Community Day__ #scd2021__ we were pleased to welcome many top-notch speakers and one of them was Benjamin Eberlei (Tideways).

Some of you guys expressed an interest in the slides for this talk “Best Practices for Running Shopware 6 in Production”, and finally, here they are!

See Benjamin Eberlei slides of his talk “Best Practices for Running Shopware 6 in Production”

Unfortunately, Benjamin couldn't be on-site at this event and so he wasn’t able to answer upcoming requests straight away. Therefore, we collected them and asked Benjamin to post his responses here.

Q&A with questions from the Shopware Community and Benjamin Eberlei

shopware-logo

Does the HTTP cache also apply to the API, especially the Store API?

Benjamin-Eberlei-100x100 As far as I can see, it doesn’t. The HTTP cache is activated through the controller annotation “@HttpCache”, which is not on API controllers. However, you can work around that by using a Symfony listener for a “kernel.response” event and setting the maximum age of the response. See https://symfony.com/doc/current/http_cache.html for more information, but take care that the cached response is also authenticated as you want it to be.
shopware-logo

Would you advise using Cloudflare for a big SW6 project?

Benjamin-Eberlei-100x100 That’s not something I can competently say.
shopware-logo Why aren’t you specifying any limits via the args for the consume command? Aren’t you running into memory leak issues that way?
Benjamin-Eberlei-100x100 It makes sense to restart the worker regularly to avoid memory leaks. I forgot to mention this issue during the presentation. It’s certainly something you have to experiment with for each shop. I thought there were defaults for the time and memory limit, but I’ve just realized that there aren’t. So, you should definitely provide values for them.
shopware-logo Why are there so few internal events you can react to via apps, e.g. cache, error and theme compiler?
Benjamin-Eberlei-100x100 I didn’t write the Shopware core, so that is something you would need to ask the Shopware developers. However, it’s a good idea not to have too many events in a system because it makes it very hard to extend and change in the future.
shopware-logo

What is your experience with deadlocks / global read locks in Shopware 6 when using the message queue (not including the message_queue_stats)? We experience that from time to time on the cart, product or seo_url table.

Benjamin-Eberlei-100x100 In my experience of helping customers with Shopware performance problems I haven't specifically come across deadlock problems yet that couldn't be fixed by increasing the database performance.
shopware-logo Why do you still use the intermediate layer enqueue and not configure Symfony messenger directly?
Benjamin-Eberlei-100x100 No particular reason. That’s what I found works with Shopware. I haven’t tested it with the Symfony internal Redis queue yet.
shopware-logo How well will this setup with systemd services work with containerized instances of Shopware 6?
Benjamin-Eberlei-100x100 You probably shouldn't use systemd with containerized Shopware 6. Instead, you should create two container images, one to run a worker and one for scheduled tasks, and then scale them according to your needs. I don't have any experience with a containerized Shopware setup though, so take this information with a pinch of salt.

Thanks a lot for your support, Benjamin! Hope to see you at next #scd2022 as well!

Watch Benjamin's SCD talk about running Shopware 6 in production

Did you miss Benjamin's talk? You can watch the full recording of the SCD21 tech stage or quickly jump to Benjamin's talk by using the chapter function (Benjamin's talk starts at chapter 3).

Watch now

About Benjamin Eberlei

Benjamin Eberlei, CEO of Tideways, was speaker at the SCD tech stage in 2021 and talked about running Shopware 6 in production.

CEO, Tideways

Benjamin develops Profiling and Monitoring Tools for Shopware and PHP applications at Tideways, and is an open-source contributor to Doctrine and the PHP language itself. Benjamin entwickelt an Profiling und Monitoring Tools für Shopware und PHP Anwendungen bei der Tideways GmbH und ist Open-Source Contributor bei Doctrine und zur Sprache PHP.

This could also interest you:

Newsletter

Never miss out - get all the latest news sent straight to your inbox.

To the newsletter manager