Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sock.connect hang #175

Open
enjoy-binbin opened this issue Apr 24, 2021 · 0 comments
Open

sock.connect hang #175

enjoy-binbin opened this issue Apr 24, 2021 · 0 comments

Comments

@enjoy-binbin
Copy link

enjoy-binbin commented Apr 24, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants