Edit Solved!
I keep failing to set up a proper connection with a Redis cluster from Laravel 9 on a Ubuntu 20.4 Droplet. I can get it to work from the App platform so I know the redis server itself is working correctly.
I found multiple tutorials, videos & examples on how to do this on DO. But all of them are for older versions of Laravel. And there seem to be some differences.
If I use predis as the redis client I end up with the following error.
Predis\Connection\ConnectionException Connection timed out [tls://db-redis-***-db.ondigitalocean.com:25061]
If I use phpredis I end up with a 504 Gateway Time-out.
Any feedback is highly appreciated!
Edit Solved!
Turns out it was a stupid little mistake on my side!
After adding my droplet to the Redis DB Trusted Sources I can use the predis client without issues.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Happy to hear that you’ve got it all working and thank you for sharing the solution here with the community.
As a reference, there was a similar question asked here which might help anyone who comes across this in the future:
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.