Skip to content

[Bug] Pulsar logs are truncated when logging to files and Pulsar runs out of direct memory when -Dpulsar.allocator.exit_on_oom=true #17587

@lhotari

Description

@lhotari

Search before asking

  • I searched in the issues and found nothing similar.

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?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

type/bugThe PR fixed a bug or issue reported a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions