MagicStack / MagicStack/asyncpg
connection was closed in the middle of operation
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 8.1k
- フォーク
- 468
- 平均マージ
- 18分
- マージ済み PR(30日)
- 4
説明
- asyncpg version: 0.15.0
- PostgreSQL version: 10.3
- local PostgreSQL:
- Python version: 3.6.5
- Platform: Ubuntu 14.04.5
- Do you use pgbouncer?: no
- Did you install asyncpg with pip?: yes
I use asyncpg with sanic. Before server start, a connection pool is made and attached to the app. In every route, the handler acquire a connection if pg access is needed. The problem is, if the pool is silent for too long, new acquired connection is not usable.
asyncpg.exceptions.ConnectionDoesNotExistError: connection was closed in the middle of operation
After one-time exception. The next acquisition is normal again. No exception with queries. Which is really weird for me.
I've tried to twist max_inactive_connection_lifetime parameter, got no luck. Actually I don't quite understand this parameter. Why would I need this parameter?
Any help is welcomed.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイルもテストも指定されていません。まず asyncpg 0.15.0、PostgreSQL 10.3、Python 3.6.5、Sanic でアイドル状態のプールのシナリオを再現し、その後、プールの取得と max_inactive_connection_lifetime の動作を調べてください。最初の取得失敗の原因を特定し、関連する変更後に動作を検証できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- postgresql, python
- 領域
- database
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100