Every time I start my redis cluster and connect to it, I get this error when trying to run any command. Error: Server closed the connection
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!
Hey,
What client are you using to connect? As mentioned in our documentation, the official redis-cli client does not yet support TLS, which is required to connect to our managed redis. With that in mind, we suggest connecting using redli, which does support TLS and has been tested to work properly with our managed redis.
Best, Eris Customer Success Engineer
From some reason my rq workers started failing with ‘cannot unpack, value too large’ issue that I cannot figure out for redis.Redis() connection, so I ended up using redis.from_url per their documentation:
https://redislabs.com/lp/python-redis/
For redis-py:
import redis
redis.from_url(url=‘your public/private connection string starting with ‘rediss://’ along with un/pw as applicable’)
and then the rq worker with a -u flag with the public/private url
For anyone who lands on this page with connection issues using Node to connect to a DO Redis DB, TLS is required. You can use the URL method to connect which is redis with 2 s’s…
rediss://…
or construct the connection and set TLS to true.
const client = redis.createClient({ host: process.env.REDIS_HOST, port: process.env.REDIS_PORT, password: process.env.REDIS_PASSWORD, TLS: true });
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.