Faust with Django connection closed problem
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 18/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
調査の方向性
The payload shows only logs from a long-running Faust agent that uses the Django ORM, with psycopg2 'connection already closed' and 'server closed the connection unexpectedly' errors. No Faust agent code or reproduction steps are included, so start by reproducing with a Faust agent that runs ORM queries over a long period. Then look at how Django manages DB connections in async or long-lived processes, such as close_old_connections and CONN_MAX_AGE. Done means a documented or tested approach that keeps connections valid across an agent's lifetime. The issue has no maintainer response and asks an open question, so it needs design decisions first.
索引モデルが issue の本文から書いたものです。
説明
I'm using Faust in combination with a Django backend. Faust is integrated as a Django app but runs in a separate container, similar to how Celery workers operate — except in this case, it's Faust with Kafka.
Inside my Faust agents, I'm performing asynchronous operations using Django's ORM. After the system runs for a while, I begin encountering connection closed errors during ORM operations. This seems related to how database connections are managed in long-lived async processes.
any idea how to handle this?
logs:
920 | psycopg2.InterfaceError: connection already closed |
-- | -- | --
| | 2025-09-12 09:56:15.920 | django.db.utils.InterfaceError: connection already closed |
| | 2025-09-12 09:56:15.920 | psycopg2.InterfaceError: connection already closed |
|
| Fields | | container_name | processor_agent.1.dic96f1ikb3zgicm8nl9l7ih7 | | filename | /var/log/docker/9cd7bc50abb53e57aabebe6f7f7b71df007ae4be86155ac89313e551c0fda5e3/json.log | | host | XXXXXXX | | source | stderr | | swarm_service | processor_agent | | swarm_stack | alertify
Fields
| container_name | processor_agent.1.dic96f1ikb3zgicm8nl9l7ih7
| filename | /var/log/docker/9cd7bc50abb53e57aabebe6f7f7b71df007ae4be86155ac89313e551c0fda5e3/json.log
| host | XXXXXXXXX
| source | stderr
| swarm_service | processor_agent
| swarm_stack | xxxx
| | 2025-09-12 09:56:15.920 | django.db.utils.OperationalError: server closed the connection unexpectedly |
| | 2025-09-12 09:56:15.920 | psycopg2.OperationalError: server closed the connection unexpectedly |
| | 2025-09-12 09:40:40.671 | elastic_transport.ConnectionError: Connection error caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) |
| | 2025-09-12 09:40:40.671 | urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
| | 2025-09-12 09:40:40.671 | raise RemoteDisconnected("Remote end closed connection without" |
| | 2025-09-12 09:40:40.671 | http.client.RemoteDisconnected: Remote end closed connection without response |
| | 2025-09-12 09:40:40.671 | raise RemoteDisconnected("Remote end closed connection without" |
| | 2025-09-12 09:00:02.668 | elastic_transport.ConnectionError: Connection error caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) |
| | 2025-09-12 09:00:02.668 | urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
| | 2025-09-12 09:00:02.668 | raise RemoteDisconnected("Remote end closed connection without" |
| | 2025-09-12 09:00:02.668 | http.client.RemoteDisconnected: Remote end closed connection without response |
| | 2025-09-12 09:00:02.668 | raise RemoteDisconnected("Remote end closed connection without" |
| | 2025-09-12 09:00:02.428 | django.db.utils.OperationalError: server closed the connection unexpectedly |
| | 2025-09-12 09:00:02.428 | psycopg2.OperationalError: server closed the connection unexpectedly |
| | 2025-09-12 09:00:02.428 | [2025-09-12 10:00:02,374] [7] [ERROR] 🔥 Error processing alert 'XXXXXXXXX': server closed the connection unexpectedly |
| | 2025-09-12 09:00:02.346 | psycopg2.InterfaceError: connection already closed |
| | 2025-09-12 09:00:02.346 | django.db.utils.InterfaceError: connection already closed
- 主要言語
- Python
- スター
- 1.9k
- フォーク
- 205
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
faust-streaming/faust のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
faust-streaming/faust#804 ·
-
scripts/install script forces use of ./venv virtualenv, impossible to use with virtualenvwrapperオープン
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
faust-streaming/faust#28 · コメント 1 件 ·
-
[BUG] SASL PLAINTEXT producer initialization fails : missing sasl_plain_username/password対応中かも @wbarnha が 56 日前に担当しました。 オープン
faust-streaming/faust#794 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
faust-streaming/faust#670 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
faust-streaming/faust#656 ·
faust-streaming/faust の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Maintainer] task area:visualizer
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
RailtownAI/railtracks#1824 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
apache/datafusion#27688 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
heasarc/heasarc-tutorials#317 ·
-
bug good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
mloda-ai/mloda-registry#1664 ·
メンテナーはふだん 1 日以内に返信