fluent / fluent/fluent-logger-python
sock.connect hang
- 主要言語
- Python
- スター
- 457
- フォーク
- 138
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I encountered a problem when using asyncsender, the fastapi project, fluent-logger==0.9.6
When I was running pytest, I found that it would be blocked for a long time after the pytest ended
And not any log to tell me why, stuck here for a while time
Found that when the logger sends logs, each log will be blocked for 20 seconds because of socket connect.
Because the fluent address error, every time when `_send_loop` consume a log, it will trigger `_reconnect`.
And each `_reconnect` will took 20 seconds. I thought of two ways
- maybe there is a way that we can add timeout on connect
- when we meeted this kind error, we clear the queue and print some log
Sorry about the bad english :). Feel free to close this if un-needed :)


コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず logger の _send_loop と _reconnect の経路を追跡し、次に無効な Fluent アドレスを使って pytest で動作を再現します。ソケット接続の失敗によってログの消費がどのようにブロックされるかを確認し、選択した処理によって 20 秒の停止が繰り返されるのを防ぎつつ、報告された診断動作が提供されることを検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- observability
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100