Skip to content

[Bug] Pulsar-perf producer OutOfDirectMemoryError with slow broker #26340

Description

@AlvaroStream

Search before reporting

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

User environment

Broker version - 4.0.9 (fail) - 3.0.5 (works)
Linux
Java: OpenJDK 21.0.11
pulsar-perf too

Issue Description

The command:

bin/pulsar-perf produce -u pulsar://<PULSAR>:6650 -r 100000 -time 300 -s 1024 persistent://public/default/perf-topic-0

Error messages

Works with pulsar 3.0.5 and throws an OutOfDirectMemoryError with 4.0.x

`
failed to allocate 4194304 byte(s) of direct memory (used: 4131389440, max: 4131389440)
`

Reproducing the issue

We need a slow broker that will force the producer to hold messages.

Additional information

The issue is resolved setting the --memory-limit 64M

This change set the default to 0

Should we set it to 64M as the default? The patch overwrite the default limit

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