Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 6, 2025

Problem

The documentation for configuring Redis as a lock store recommended using named connections via shopware.redis.connection.connection_name, but this approach doesn't work and causes connection errors like:

Redis connection failed: Connection refused

Customers following the documented approach would encounter these errors, while the "not recommended" DSN approach (redis://host:port/dbindex) was actually the only working solution.

Solution

Updated the documentation to:

  • Remove the broken named connection recommendation that used shopware.redis.connection.connection_name
  • Make the DSN approach the primary and recommended method since it's what actually works
  • Update the DSN format to include the database index: redis://host:port/dbindex
  • Add a concrete example showing redis://127.0.0.1:6379/0 for clarity
  • Remove misleading warnings that discouraged using the DSN approach

Example

The documentation now correctly shows:

framework:
    lock: 'redis://127.0.0.1:6379/0'

Instead of the broken:

framework:
    lock: 'shopware.redis.connection.connection_name'

Fixes the issue reported in #[issue_number] where customers experienced connection failures when following the previous documentation.

Original prompt

This section details on the original issue you should resolve

<issue_title>Redis as a lock store - Core or Dev docu erroneous</issue_title>
<issue_description>### Shopware Version

6.6.10.6

Affected area / extension

Platform(Default)

Actual behaviour

A Customer wanted to set up a lock storage with Redis. To do this, they followed the instructions in the Shopware DEV documentation: https://developer.shopware.com/docs/guides/hosting/performance/lock-store.html#using-redis-as-a-lock-store

Unfortunately, the recommended setting does not work. If you follow the recommended instructions

framework:
    lock: 'shopware.redis.connection.connection_name'

When you enter lock.yaml, error messages such as the following appear:

Error thrown while handling message Shopware\Core\Framework\Adapter\Cache\InvalidateCacheTask. Removing from transport after 3 retries. Error: "Redis connection failed: Connection refused" {"class":"Shopware\\Core\\Framework\\Adapter\\Cache\\InvalidateCacheTask","message_id":null,"retryCount":3,"error":"Redis connection failed: Connection refused","exception":"[object] (Symfony\\Component\\Cache\\Exception\\InvalidArgumentException(code: 0): Redis connection failed: Connection refused at /home/marbuhkl/www.DOMAIN.COM/vendor/symfony/cache/Traits/RedisTrait.php:320)"} []

The following is entered in z-shopware.ymal in accordance with the Shopware documentation:

redis:
       connections:
          lock:
             dsn: 'redis://127.0.0.1:9999/0'

Expected behaviour

We then changed the entry in lock.ymal to the settings not recommended according to the documentation:

framework:
    lock: 'redis://127.0.0.1:9999/0'

Everything works as expected.

How to reproduce

Could you please check this internally and, if necessary, adjust the documentation or fix the error in the core?

I created this ticket for the customer, but I don't know whether the DEV docu must be changed or something in the core source codes.</issue_description>

<agent_instructions>update the documentation to just redis://ip:port/dbindex</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes shopware/shopware#12862

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Redis as a lock store - Core or Dev docu erroneous Fix Redis lock store documentation - remove broken named connection approach Oct 6, 2025
@Copilot Copilot AI requested a review from shyim October 6, 2025 14:21
Copilot finished work on behalf of shyim October 6, 2025 14:21
@shyim shyim marked this pull request as ready for review October 7, 2025 03:35
@shyim shyim requested a review from sushmangupta October 7, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redis as a lock store - Core or Dev docu erroneous
2 participants