Skip to content

Connection Closed by Server Errors #593

Open
@rishindoshi

Description

@rishindoshi

Hey everyone hope you're doing well!

I have a Django application on v3.2.11 and I'm trying to hook it up to a redis cache using this package. Testing the application with a local instance of redis works perfectly, but when trying to connect to a remote redis instance I have hosted on Digital Ocean, I keep getting the "Connection close by server" error.

My settings.py cache config is set up as follows:

CACHES = {
    "default": {
        "BACKEND": "django_redis.cache.RedisCache",
        'LOCATION': (
            'redis://<user>:<password>'
            '@discz-staging-redis-do-user-10516625-0.b.db.ondigitalocean.com:25061'
        ),
        "OPTIONS": {
            "CLIENT_CLASS": "django_redis.client.DefaultClient",
        }
    }
}

Another thing of note is that I'm able to connect to the remote redis instance via redis-cli, but only if I add the --tls option. If I don't run it with --tls, then I get the same "Connection closed by server" error on the command line.

Any help on this would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions