we are using aioredis v2.0. and connecting azure redis cache. getting high db connections spike when we are doing load test
Surendra-thota1640 opened this issue · 0 comments
Describe the bug
we are using aioredis v2.0. and connecting azure redis cache p2 tier from python FastAPI deployed in Kubernetes . getting high db connections spike at redis and failing when we are doing load test using locust with 150 users
below code we are using using for connection and we use that redis object for get and mget operations
async def get_redis_service() -> RedisService: password = os.environ["REDIS_PASSWORD"] host = os.environ["REDIS_HOST"] port = os.environ["REDIS_PORT"] redis_ssl = bool(os.environ["REDIS_SSL"]) db_index = os.environ["REDIS_DB_INDEX"] redis = Redis( host=host, port=port, db=db_index, password=password, decode_responses=True, ssl=redis_ssl, ) return RedisService(redis, RedisValue)
To Reproduce
try to use this aioredis v2.0 module in Fast API connecting azure redis cache and performs load test
Expected behavior
we are expecting no error in load test
Logs/tracebacks
our application failing with 503 error and error logged at Azure API management
Python Version
$ python --version. 3.8
aioredis Version
$ python -m pip show aioredis. v2.0
Additional context
No response
Code of Conduct
- I agree to follow the aio-libs Code of Conduct