perf: Optimize redis connection number

pull/15170/merge
wangruidong 2025-08-04 18:41:46 +08:00 committed by 老广
parent 4e33b5b478
commit d185be2180
2 changed files with 2 additions and 1 deletions

View File

@ -204,6 +204,7 @@ class Config(dict):
'REDIS_SSL_CERT': None,
'REDIS_SSL_CA': None,
'REDIS_SSL_REQUIRED': 'none',
'REDIS_MAX_CONNECTIONS': 100,
# Redis Sentinel
'REDIS_SENTINEL_HOSTS': '',
'REDIS_SENTINEL_PASSWORD': '',

View File

@ -373,7 +373,7 @@ REDIS_OPTIONS = {
"health_check_interval": 30
},
"CONNECTION_POOL_KWARGS": {
'max_connections': 100,
'max_connections': CONFIG.REDIS_MAX_CONNECTIONS,
}
}
if REDIS_USE_SSL: