Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaConsole$JavaConsoleHolder take 70% of RAM (openwebstart 1.7 and eclipse tumerin 17.0.7 #564

Open
guykatz opened this issue Nov 22, 2023 · 1 comment

Comments

@guykatz
Copy link

guykatz commented Nov 22, 2023

Hi all;
I am trying to debug a RAM issue with my app (java app with swing and openwebstart).
I am running openwebstart 1.7 and java 17 (tumerin)
I took a heap dump when I have RAM issue and I see the report on eclipse MAT (memory analyzer tool) that instances of class JavaConsole$JavaConsoleHolder are taking most of the heap.
is this to be expected? not sure what this class does and why it takes so much space.
diving deeper looks like console messages are taking all the space inside this object?
any guidence will help
image

thanks
PS: we are using log4j2.17.1 which I noticed was flagged in another thread here as problematic but I am not sure if for the same reason

@AlBundy33
Copy link

AlBundy33 commented Dec 5, 2023

see #530 and AdoptOpenJDK/IcedTea-Web#921

Workaround 1: Enable the console and check if you application writes to stdout and try to avoid this
Workaround 2: set the console to disabled (instead of hidden)
Workaround 3: write a cleanup-thread that peridically clears the map (can only be done by reflection)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants