Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,20 @@
# Mimicing memcache behavior.
# https://github.com/jazzband/django-redis#memcached-exceptions-behavior
"IGNORE_EXCEPTIONS": True,
# TCP keepalive for pooled connections. Without SO_KEEPALIVE the
# kernel never sends probes, regardless of host-level sysctl
# tuning, so pooled Redis connections can sit idle long enough
# for cloud firewalls to silently drop them. The next task to
# borrow such a connection from the pool fails with ECONNRESET.
# Values mirror CELERY_BROKER_TRANSPORT_OPTIONS.socket_settings
# below. See RolnickLab/antenna#1218.
"SOCKET_KEEPALIVE": True,
"SOCKET_KEEPALIVE_OPTIONS": {
socket.TCP_KEEPIDLE: 60,
socket.TCP_KEEPINTVL: 10,
socket.TCP_KEEPCNT: 9,
},
"SOCKET_CONNECT_TIMEOUT": 5,
Comment thread
mihow marked this conversation as resolved.
Outdated
},
}
}
Expand Down
Loading