-
Notifications
You must be signed in to change notification settings - Fork 435
Closed
Description
- asyncpg version: 0.18.3
- PostgreSQL version: 9.6
- Python version: 3.6
- Platform: linux
- Do you use pgbouncer?: No
- Did you install asyncpg with pip?: yes
- Can the issue be reproduced under both asyncio and
uvloop?: n/a
Running pool.acquire()
you're returned a PoolAcquireContext
, during __aexit__
it calls await self.pool.release(con)
, which is PoolConnectionHolder.release(timeout=None)
. This method then performs logic like the following:
...
self._timeout = None
...
budget = timeout # None
...
await asyncio.wait_for(
self._con._protocol._wait_for_cancellation(),
budget, loop=self._pool._loop)
...
This means that if _wait_for_cancellation
hangs (which it has in our scenario), there is no way for the user to set a timeout to cancel the cancellation because not only is timeout not passed from the PoolAcquireContext
, but also any timeout stored in PoolConnectionHolder
is cleared out.
Metadata
Metadata
Assignees
Labels
No labels