aio-libs / aio-libs/aiopg

Cursor.execute() freezes + Pool.wait_closed() blocks after Pool.close()

Đang mở
#800 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.4k
Fork
170
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Dear contributors,

do you have any ideas why execute can at all freeze??

At the time it blocks, **pgAdmin** says that connection is `idle` and Wait event is `Client: ClientRead`
```
wapp["state"]["db"] = await aiopg.create_pool(host=wapp["config"]["db-ip"],
database=wapp["config"]["db-name"],
user=wapp["config"]["db-usr"],
password=wapp["config"]["db-pwd"],
timeout=wapp["config"]["db-connect-timeout"])

async with wapp["state"]["db"] as _dbconn:
# Get cursor
_c = await _dbconn.cursor()
# Get all table contents
await _c.execute("SELECT * FROM fa_user_timestamps;")
# Fetch all results
_rc = _c.rowcount
_sm = _c.statusmessage
if _rc != -1:
_qr = await _c.fetchall()
```
In the end, after handling SIGTERM via `loop.add_signal_handler()` and calling `Pool.close()` - the `await Pool.wait_closed()` as well blocks.

Am I doing something wrong??

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.