SOCKET_CONNECT_TIMEOUT is the timeout for the connection to be established and SOCKET_TIMEOUT

https://github.com/niwinz/django-redis/blob/master/doc/content.adoc#32-socket-timeout

 

3.2. Socket timeout

Socket timeout can be set using SOCKET_TIMEOUT and SOCKET_CONNECT_TIMEOUT options:

CACHES = {
    "default": {
        # ...
        "OPTIONS": {
            "SOCKET_CONNECT_TIMEOUT": 5,  # in seconds
            "SOCKET_TIMEOUT": 5,  # in seconds
        }
    }
}

SOCKET_CONNECT_TIMEOUT is the timeout for the connection to be established and SOCKET_TIMEOUT is the timeout for read and write operations after the connection is established.

 

 

 

 

posted @ 2019-06-12 18:43  papering  阅读(429)  评论(0编辑  收藏  举报