Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

we are using aioredis v2.0. and connecting azure redis cache. getting high db connections spike when we are doing load test #1335

Open
1 task done
Surendra-thota1640 opened this issue Apr 1, 2022 · 0 comments
Labels

Comments

@Surendra-thota1640
Copy link

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant