lhotari opened a new issue #13382:
URL: https://github.com/apache/pulsar/issues/13382


   **Describe the bug**
   When setting `PULSAR_EXTRA_OPTS`, the expectation would be that the JVM 
options would be added to the existing JVM arguments. However, this is not the 
case.
   
   If `PULSAR_EXTRA_OPTS` isn't set, these parameters will get set 
`-Dpulsar.allocator.exit_on_oom=true 
-Dio.netty.recycler.maxCapacity.default=1000 
-Dio.netty.recycler.linkCapacity=1024` .
   If you set `PULSAR_EXTRA_OPTS`, these parameters will be omitted. For 
example, the `pulsar.allocator.exit_on_oom` setting will exit the JVM if the 
PulsarByteBufAllocator cannot allocate a ByteBuf.
   
   **Expected behavior**
   Setting `PULSAR_EXTRA_OPTS` shouldn't remove the default settings, but 
instead add to them. One possible solution would be to make the 
PULSAR_EXTRA_OPTS setting in pulsar_env.sh to be made this way:
   ```
   # Extra options to be passed to the jvm
   PULSAR_EXTRA_OPTS="-Dpulsar.allocator.exit_on_oom=true 
-Dio.netty.recycler.maxCapacity.default=1000 
-Dio.netty.recycler.linkCapacity=1024 ${PULSAR_EXTRA_OPTS}"
   ```
   
   **Additional context**
   Other improvements for environment variable handling was recently done in PR 
#13025


-- 
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: [email protected]

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


Reply via email to