question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OutOfDirectMemoryError

See original GitHub issue

Describe the bug We’re using a proxy to connect to our pulsar cluster and the proxy was failing to send messages to our broker. The error on the broker is:

WARN io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: .... ]
io.netty.util.internal.OutOfDirectMemoryError: failed to allocated 866 byte(s) of direct memory (used: 4Gb, max: 4Gb)
at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:640)
at io.netty.util.internal.PlatformDependent.allocatedDirectNoCleaner(PlatformDependent.java:594)
...

Expected behavior I’d expect the proxy to send data to another broker, but I also don’t see why this broker would have an OOM when it should be persisting to disk for the most part?

Desktop (please complete the following information): CentOS 7.6 Pulsar 2.2.1

Additional context -Xms4g -Xmx16g -XX:MaxDirectMemorySize=4g

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
merlimatcommented, Jan 22, 2019

@bputt This would be kind of addressed in 2.3. The changes were described in https://github.com/apache/pulsar/wiki/PIP-24%3A-Simplify-memory-settings .

The implementation was actually done in BookKeeper and will be available in 4.9.0 release (which is currently being voted). Once that’s available, we’ll add the hooks in Pulsar broker as well to ensure that under any circumstances, the broker will restart when a OOM exception occurs. (at the same mitigations for that not to happen as easily are also there).

1reaction
bputtcommented, Jan 22, 2019

@merlimat do you have an expected release date for 2.3?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to find a root cause of the following netty error: io.netty.util ...
OutOfDirectMemoryError : failed to allocate 16777216 byte(s) of direct memory (used: 117440512, max: 119537664) at io.netty.util.internal.
Read more >
Netty OutOfDirectMemoryError: failed to allocate direct memory
We have a direct memory allocated of about 14gb. We have 10gb dedicated to a cache (separated from reactor-netty). We expected that for...
Read more >
OutOfDirectMemoryError (Netty/Common 4.1.43.Final API)
OutOfMemoryError that is throws if PlatformDependent.allocateDirectNoCleaner(int) can not allocate a new ByteBuffer due memory restrictions. See Also: ...
Read more >
OutOfDirectMemoryError - Google Groups
OutOfDirectMemoryError : failed to allocate 16777216 byte(s) of direct memory (used: 1056964615, max: 1073741824). I looked at the history of this user group ......
Read more >
OutOfDirectMemoryError (Netty API Reference (4.1.85.Final))
OutOfMemoryError that is throws if PlatformDependent.allocateDirectNoCleaner(int) can not allocate a new ByteBuffer due memory restrictions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found