[Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory when -Dpulsar.allocator.exit_on_oom=true #17587
Labels
type/bug
The PR fixed a bug or issue reported a bug
Search before asking
Version
2.10.x
Minimal reproduce step
It's possible to reproduce the issue when running Pulsar in a configuration where Pulsar logs to log files. (a VM based deployment). To reproduce, configure the direct memory to a low value and stress the broker with sufficient load so that the direct memory runs out.
This problem doesn't appear in Kubernetes environments since logging uses System.out / stdout which flushes after each line by default.
What did you expect to see?
the Pulsar logs should be writted to disk before Pulsar exits the Java process
What did you see instead?
Pulsar log files are truncated and don't contain the last logged lines
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: