Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spop(): aredis.exceptions.RedisClusterException: Too many connections #210

Open
pritamlipu1 opened this issue Dec 20, 2021 · 1 comment
Open

Comments

@pritamlipu1
Copy link

pritamlipu1 commented Dec 20, 2021

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

@pritamlipu1 pritamlipu1 changed the title aredis.exceptions.RedisClusterException: Too many connections spop: aredis.exceptions.RedisClusterException: Too many connections Dec 20, 2021
@pritamlipu1 pritamlipu1 changed the title spop: aredis.exceptions.RedisClusterException: Too many connections spop(): aredis.exceptions.RedisClusterException: Too many connections Dec 20, 2021
@nickswebsite
Copy link

This PR should fix it: #194

Not sure if this project is still being maintained or not. Looks like @NoneGG didn't have any activity in 2021.

NoneGG had no activity during this period.

Hope he is all right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants