Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Redis connection errors #611

Merged
merged 10 commits into from
Feb 12, 2024
7 changes: 6 additions & 1 deletion backend/pennclubs/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": f"redis://{REDIS_HOST}:6379/1",
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient"},
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
"IGNORE_EXCEPTIONS": True, # ignore Redis connection errors
"SOCKET_CONNECT_TIMEOUT": 1,
"SOCKET_TIMEOUT": 1,
},
"KEY_PREFIX": "django",
}
}
Loading