-
Notifications
You must be signed in to change notification settings - Fork 12
Description
In the past weeks, there were multiple outage events on Production due to connection issues between dmart and redis. In the logs we are finding entries with the following message: "No connection available."
The issue occured on the 1.1.4 dmart version where redis version was 7.2.3. with 5.0.1 python package.
We've tried to reproduce the issue on DEV environment performing load tests and experienced the same connection issues.
Also tried 1.1.10 version of dmart and the same issues occured.
Please identify the root cause and provide fix ASAP
In our load test, this error came up at around 800 active users with 120 calls per sec.
This redis-py github issue might be connected to the issue we experience redis/redis-py#2995
dmart v1.1.10
-
Calling the /public/excute/query/products endpoint through jmeter.
-
Using the default redis' BlockingConnectionPool's max_connections parameter value of 20, we experienced the "No connection available" error when we had 75 calls per second.
-
We increased the redis' BlockingConnectionPool's max_connections parameter to 2000. With 150 calls per second we did not experience the "No connection available" error anymore.
-
With 2000 max_connections, we are receiving a "Too many open files" os level error. We are using the default ulimit value of 2048.
dmart v1.1.4
-
With 2000 max_connections, the following command shows increasing amount of open file descriptors:
lsof | grep python | grep "localhost:redis" | wc -l
Last confirmed value was over 15_000. -
With 20 max_connections the following command shows stable amount of open file descriptors (240-290):
lsof | grep python | grep "localhost:redis" | wc -l -
With 20 max_connections, the following command shows increasing amount of open file descriptors:
lsof | grep python | wc -l
Last confirmed value was over 13_000.