You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/14 17:01:03 UTC

[GitHub] [pulsar] syhily opened a new issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

syhily opened a new issue #12039:
URL: https://github.com/apache/pulsar/issues/12039


   **Describe the bug**
   
   ```java
   Caused by: java.util.concurrent.CompletionException: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: java.lang.OutOfMemoryError: Direct buffer memory
   	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
   	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
   	at java.base/java.util.concurrent.CompletableFuture$OrApply.tryFire(CompletableFuture.java:1503)
   	... 42 more
   Caused by: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: java.lang.OutOfMemoryError: Direct buffer memory
   	at org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector.lambda$retryOperation$4(AsyncHttpConnector.java:249)
   	... 39 more
   Caused by: org.apache.pulsar.shade.io.netty.handler.codec.EncoderException: java.lang.OutOfMemoryError: Direct buffer memory
   	at org.apache.pulsar.shade.io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:104)
   	at org.apache.pulsar.shade.io.netty.channel.CombinedChannelDuplexHandler.write(CombinedChannelDuplexHandler.java:346)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
   	at org.apache.pulsar.shade.io.netty.handler.stream.ChunkedWriteHandler.doFlush(ChunkedWriteHandler.java:303)
   	at org.apache.pulsar.shade.io.netty.handler.stream.ChunkedWriteHandler.flush(ChunkedWriteHandler.java:132)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:750)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:765)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758)
   	at org.apache.pulsar.shade.io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020)
   	at org.apache.pulsar.shade.io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311)
   	at org.apache.pulsar.shade.org.asynchttpclient.netty.request.NettyRequestSender.writeRequest(NettyRequestSender.java:420)
   	... 23 more
   ```
   
   **To Reproduce**
   
   1. Create a pulsar client.
   2. Consuming messages on JDK 11.
   
   **Additional context**
   
   This affects the e2e test on flink: https://github.com/apache/flink/pull/17271
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #12039:
URL: https://github.com/apache/pulsar/issues/12039#issuecomment-919484608


   Did you try to allow netty reflective access?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] syhily closed issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

Posted by GitBox <gi...@apache.org>.
syhily closed issue #12039:
URL: https://github.com/apache/pulsar/issues/12039


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] syhily commented on issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

Posted by GitBox <gi...@apache.org>.
syhily commented on issue #12039:
URL: https://github.com/apache/pulsar/issues/12039#issuecomment-919625117


   @eolivelli Yep, you are right. This is not a bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] syhily commented on issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

Posted by GitBox <gi...@apache.org>.
syhily commented on issue #12039:
URL: https://github.com/apache/pulsar/issues/12039#issuecomment-920075463


   This issue occurs in testing on the Flink. We would create multiple Producers, Consumers, and PulsarClients. This would cause this error. So I have to just increase the off-heap memory on Flink.
   
   https://github.com/apache/flink/blob/2b5acc096443e48a72afadcd180bfe62c1ea6f2f/flink-end-to-end-tests/flink-end-to-end-tests-pulsar/src/test/java/org/apache/flink/tests/util/pulsar/common/FlinkContainerWithPulsarEnvironment.java#L50
   
   I close this issue because of the [PIP-74](https://github.com/apache/pulsar/wiki/PIP-74%3A-Pulsar-client-memory-limits). It would reduce memory usage and avoid OOM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] eolivelli commented on issue #12039: Client fails by java.lang.OutOfMemoryError when running under Java 11

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #12039:
URL: https://github.com/apache/pulsar/issues/12039#issuecomment-919965128


   @syhily can you please share your solution here ? for future references ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org