Replies: 1 comment
-
|
I remember digging into this a year ago and there was no good way to make it more sane without a ton of breaking changes.
People have tried a few times laravel/docs#9321, laravel/docs#3509 to document this but its confusing because its highly different between cluster, non-cluster, sentinel, version number, etc. I couldn't even find an elegant "Laravel" way to fix it myself. People have tried to fix the loading because its confusing, but that hasn't gone well either #51026, #51006 or trying to add the hash tag into core (#18582) or even noticing new features that break clusters (#57651). Some projects don't even support clusters and you have to find that note hidden in a closed issue - people tried to update docs for that land mine, but it never made it through, maybe my try will. All this to mean - its hard. Clusters are a mess to be blunt. You have to peek code based on your versions and make it work. I even wrote a blog about this so I could remember all the issues I hit last time I did this. Best of luck. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
12.40.2
PHP Version
8.4
Database Driver & Version
No response
Description
I posted on issue #58000.
I had an issue with
phpredisThe error message was:
Based on the Laravel documentation to set up a Redis cluster connection the config should look like:
I had to setup Redis cluster with
phprediswith ACL authentication.The issue I found is when calling method
createRedisClusterInstanceonPhpRedisConnectorclassThe fifth argument
authon variable$parametersis set asnull.To solve the issue I had to change my configuration
Also as if you noticed
'persistent' => true,should be inside of each cluster connection.Issue:
The class that generates the mapping for the variable
$parametersis not mapping corrected.OR
Laravel docs should be updated.
Hey @crynobone.
I did upgrade my Laravel framework 12.40.2 and the PHP version 8.4. and the issue still present. I have worked around
What I noticed on this new version is the 5th parameter is not present at all, as the previous version was set to null.
I do believe the method that maps the config into the
$parameteris not reading for each cluster node neither from the options username and password.The solution for me was to add credentials combined as you see below.
Steps To Reproduce
Requires a Redis cluster with ACL
I added a test endpoint, as you see I had to keep the cache as
databaseand change toredison runtime to be able to test this endpoint.Beta Was this translation helpful? Give feedback.
All reactions