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

bounded queue: block the hot thread instead of dropping messages #270

Closed
odygrd opened this issue Mar 15, 2023 Discussed in #269 · 0 comments · Fixed by #271
Closed

bounded queue: block the hot thread instead of dropping messages #270

odygrd opened this issue Mar 15, 2023 Discussed in #269 · 0 comments · Fixed by #271
Labels
enhancement New feature or request

Comments

@odygrd
Copy link
Owner

odygrd commented Mar 15, 2023

Discussed in #269

Originally posted by brendene March 14, 2023
Hello and thanks again for the library! Would you consider a logging mode where log messages are not dropped and the queue is non allocating? i.e. blocking

A use case would be stress testing a webserver that uses quill for logging. When the webserver is running in real time, logs are flushed to disk and the queue isn't growing. However, if you are stress testing the webserver with a preset load and piping the output to less eventually the pipe buffer fills up and the quill backend thread isn't able to drain so the queue gets larger and larger until the system possibly runs out of memory.

I realize this isn't in the spirit of a low latency logger but it would be nice to be able to utilize the same logging code (perhaps with a config option that enables/disables it) without adding quill::flush() everywhere.

@odygrd odygrd added the enhancement New feature or request label Mar 15, 2023
@odygrd odygrd linked a pull request Mar 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant