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

TimeoutError: Timed out closing connection after None #1292

Open
1 task done
Olegt0rr opened this issue Feb 10, 2022 · 3 comments
Open
1 task done

TimeoutError: Timed out closing connection after None #1292

Olegt0rr opened this issue Feb 10, 2022 · 3 comments
Labels

Comments

@Olegt0rr
Copy link
Contributor

Olegt0rr commented Feb 10, 2022

Describe the bug

After switch to aioredis v2 start to receiving an error:
TimeoutError: Timed out closing connection after None

The same code on <2 dependency works without any errors!
Average redis load ~2.5k RPS
Redis server working via SaaS and has no troubles with availability and resources

To Reproduce

Don't know how...

Expected behavior

aioredis works fine similar to the previous version

Logs/tracebacks

TimeoutError: Timed out closing connection after None
...
  File "aiogram/contrib/fsm_storage/redis.py", line 265, in get
    return await self._redis.get(name, **kwargs)
  File "aioredis/client.py", line 1082, in execute_command
    conn = self.connection or await pool.get_connection(command_name, **options)
  File "aioredis/connection.py", line 1425, in get_connection
    await connection.disconnect()
  File "aioredis/connection.py", line 812, in disconnect
    raise TimeoutError(

Python Version

$ python --version
CPython
3.9.10(3.9.10 (main, Jan 29 2022, 04:19:45) 
[GCC 10.2.1 20210110])

aioredis Version

$ python -m pip show aioredis
2.0.1

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@Olegt0rr Olegt0rr added the bug label Feb 10, 2022
@Olegt0rr
Copy link
Contributor Author

Olegt0rr commented Feb 12, 2022

Workaround

To avoid this exception I limit connections amount with max_connections.
But it's not a solution for this behaviour

@Andrew-Chen-Wang
Copy link
Collaborator

Andrew-Chen-Wang commented Feb 12, 2022

Does the problem still occur on master branch? I suspect you're not disconnecting the connection pool (on master, it should be auto disconnecting when you call Redis.disconnect)

@Olegt0rr
Copy link
Contributor Author

Olegt0rr commented Feb 12, 2022

@Andrew-Chen-Wang,
can't test this behaviour in my production anymore, cause it was butthurt for me :hurtrealbad:
As soon as new version will be released, it will be implemented on my staging and the I'll try to check it with my testers.
Thanks for response!

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

2 participants