Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is there any problem when disabling log4j2 jmx?

Explorer ,
Mar 24, 2025 Mar 24, 2025

My web server is using CF2021 update18 (Log4j version 2.20.0: jmx enabled default: -Dlog4j2.disable.jmx=false).
-When I set metaspace = 256, the memory has nearly 2 million elements of org.apache.logging.log4j.core.jmx.LoggerContextAdmin (watched by jmap -dump).
-When metaspace = 512, the memory drops to about more than 500 thousand elements.
-When disabling jmx (-Dlog4j2.disable.jmx=true, Log4j Starting in version 2.24.0 JMX support is disabled by default), the memory no longer has .jmx.LoggerContextAdmin (as expected to reduce memory).

 

So my question is: When disabling jmx, will it affect coldfusion? (my web server)

※I hope it doesn't affect anything my web server

Best regards.

374
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 25, 2025 Mar 25, 2025

I'm not aware of cf leveraging any aspect of jmx, which as you may know makes various metrics available for consumption. That seems especially so for jmx about log4j. But maybe someone else will have more specific clarity on that. 

 

I'll say I'm surprised by your findings, and those workarounds: I've not heard of either being mentioned previously. Indeed, I'm inclined to wonder if there's more to your observed memory rise with the bulk being the log4j objects. Perhaps you have some other featur

...
Translate
Community Expert ,
Mar 25, 2025 Mar 25, 2025

I'm not aware of cf leveraging any aspect of jmx, which as you may know makes various metrics available for consumption. That seems especially so for jmx about log4j. But maybe someone else will have more specific clarity on that. 

 

I'll say I'm surprised by your findings, and those workarounds: I've not heard of either being mentioned previously. Indeed, I'm inclined to wonder if there's more to your observed memory rise with the bulk being the log4j objects. Perhaps you have some other feature enabled that does excessive logging (like the jdbc logging option for cf's included datasource types), or perhaps code doing cflog/writelog that is run at huge rates. There are ways one could detect that by the results created, if not found more readily otherwise. 

 

Anyeay, thanks for sharing the info you have in case it may help others who'd find this.


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 25, 2025 Mar 25, 2025

Dear Charlie,

Thank you very much for your response.

As you said, maybe my web service is logging excessively.

You're welcome!

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 08, 2025 Jul 08, 2025
LATEST

I checked my web app, it is not affected so I would like to close this conversation. Thanks again Charlie!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources