|
|
|
@ -73,8 +73,8 @@ async def lifespan(app: FastAPI): |
|
|
|
|
socket_connect_timeout=5, |
|
|
|
|
socket_keepalive=True, |
|
|
|
|
retry_on_timeout=True, |
|
|
|
|
# 连接池参数(Redis默认有连接池,这里调整) |
|
|
|
|
max_connections=100, # Redis连接池最大连接数 |
|
|
|
|
# 连接池参数 |
|
|
|
|
max_connections=128, # Redis连接池最大连接数 |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
await app.state.redis_client.ping() |
|
|
|
|