lhotari edited a comment on issue #10136:
URL: https://github.com/apache/pulsar/issues/10136#issuecomment-829159713


   For direct memory leaks, it's most likely about Netty pooled memory. For 
debugging the situation, it might be useful to check if there are log messages 
from the Netty leak detector.
   
   It turns out that the [default setting for Netty leak detection for Pulsar 
broker is 
'Disabled'](https://github.com/apache/pulsar/blob/8ea4a39dc8bf6f2f23a160688bb70a80f6acfd4d/pulsar-common/src/main/java/org/apache/pulsar/common/allocator/PulsarByteBufAllocator.java#L60-L61).
   
   Please set `-Dpulsar.allocator.leak_detection=Simple` in `PULSAR_EXTRA_OPTS` 
environment variable to enable the simple detection. After Netty leaks would 
get reported to the log with this type of of log messages: 
   
   
https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/ResourceLeakDetector.java#L318-L336
   
   The possible leak detection log entries can be found by grepping the logs 
for "LEAK: ".
   
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to