sock.connect hang

オープン
#175 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
observability

調査の方向性

まず logger の _send_loop と _reconnect の経路を追跡し、次に無効な Fluent アドレスを使って pytest で動作を再現します。ソケット接続の失敗によってログの消費がどのようにブロックされるかを確認し、選択した処理によって 20 秒の停止が繰り返されるのを防ぎつつ、報告された診断動作が提供されることを検証します。

索引モデルが issue の本文から書いたものです。

説明

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 :)

image

image

主要言語
Python
スター
457
フォーク
138
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fluent/fluent-logger-python のほかの issue

fluent/fluent-logger-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。