fluent / fluent/fluent-logger-python

sock.connect hang

Ouverte
#175 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
457
Forks
138
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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](https://user-images.githubusercontent.com/22811481/115949548-8125ed80-a508-11eb-932f-8295d4b1545a.png)

![image](https://user-images.githubusercontent.com/22811481/115949056-bc262200-a504-11eb-9245-60ce2fb673ef.png)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par suivre les chemins _send_loop et _reconnect du logger, puis reproduisez le comportement avec pytest et une adresse Fluent invalide. Vérifiez comment les échecs de connexion du socket bloquent la consommation des logs et assurez-vous que le traitement choisi empêche les blocages répétés de 20 secondes tout en fournissant le comportement de diagnostic signalé.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
observability
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.