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!
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!