-
Notifications
You must be signed in to change notification settings - Fork 96
Description
aredis version: 1.1.8
aioredis version: 1.3.1
We are getting following error related to aredis when calling " js = await redis.spop('queue name')". Please suggest.
Observation:
spop is the only operation used when service runs in idle state. https://github.com/NoneGG/aredis/blob/master/aredis/pool.py#L385
if self.count_all_num_connections(node) >= self.max_connections:
if self.max_connections_per_node:
raise RedisClusterException("Too many connection ({0}) for node: {1}"
.format(self.count_all_num_connections(node),
node['name']))
raise RedisClusterException("Too many connections")
I think aredis is leaking connections.
getting following error, stack trace:
2021-12-20 06:39:09,882 ERROR worker - failed
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/aredis/pool.py", line 504, in get_connection_by_node
connection = self._available_connections.get(node["name"], []).pop()
IndexError: pop from empty list
js = await redis.spop(Scheduler.r_report_q)
File "/usr/local/lib/python3.6/dist-packages/aredis/commands/sets.py", line 88, in spop
File "/usr/local/lib/python3.6/dist-packages/aredis/utils.py", line 179, in inner
File "/usr/local/lib/python3.6/dist-packages/aredis/client.py", line 407, in execute_command
File "/usr/local/lib/python3.6/dist-packages/aredis/pool.py", line 506, in get_connection_by_node
File "/usr/local/lib/python3.6/dist-packages/aredis/pool.py", line 397, in make_connection
aredis.exceptions.RedisClusterException: Too many connections