-
Notifications
You must be signed in to change notification settings - Fork 41
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
Call flushSync if too much data buffered #185
Comments
I'm doing something like this atm:
|
This was partially implemented with Did you implement that workaround becaude you experienced some OOM crash? |
Correct. |
I think we might need some more guidance in the docs around async mode and this. Not quite sure what that would be though. |
Would it make sense to have a "maxLength" in addition to "minLength" which indicates an automatic flush? |
I would not do an automatic flush because it might cause writing data out of order, it's unlikely but there is a race condition. If you are not logging on Docker, raise minLength to a few megabytes, and see how it performs. In your case, I would operate it sync with an even higher minLegth. |
If the output can't keep up calling async flush will just make things bad and register a lot of drain handlers in ´callFlushCallbackOnDrain´.
If we get to this point we should somehow force some throttling either through some kind of write/flush sync or a spin loop.
The text was updated successfully, but these errors were encountered: