-
Notifications
You must be signed in to change notification settings - Fork 211
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
Set the vmArg HeapDumpOnOutOfMemoryError to be optional #1212
Comments
Absolutely agree @licam , this default setting it still there from the early days and should be removed. In case of debugging OOM situations, users can add this back via the preferences. |
Beyond that: if you are encouraging OOM situations with the language server process (sounds like you do), it would be extremely interesting to share some details here (maybe even one of those generated heap dumps) to debug this situation and see why you are running into the OOM situation. |
Thank you for the prompt response. We have a certain case where there's a huge Java project and the users gets OOM all the time from the extension. For our best understanding, that's because of the size of the project. Unfortunately we do not have the project either as it's a customer's project and they are not allowed to share. Regarding the heap dump, I'm verifying it. |
You could also add |
Thanks. We are aware of that, but as the resources are shared between the cloud users, increasing the heap size might have a negative effect on other users. |
Understand. One additional argument to dive deeper here and analyze the root cause of the OOM and fix that... :-) |
Fixed with 01a69ba |
@licam I still would love to get a few more details about this OOM and try to find the root cause for this. Can you provide insights into:
I would like to investigate this in more detail to see if we can avoid the OOM altogether and make the tooling work smoothly even if you have those large projects and limited memory settings for the tooling and the language server process. Very much hope that you can share those details. |
@martinlippert The project contains around 16K Java files. Here's the stack trace: |
@licam Thanks for the additional details, much appreciated. I might ask you to try a snapshot with this huge project to see if future changes make a reasonable difference, so stay tuned and be prepared... ;-) Also, if you have tried different -Xmx settings, it would be interesting to hear how much memory would make the OOM error to not appear anymore. |
I tried asking the customer which Xmx value is enough for his project but I don't have a reply yet. |
I will continue the work on optimizing the memory consumption in #1219. Looks like the indexing mechanism (which parses the source files) is causing the memory spikes and therefore OOM errors when indexing projects with many source files. |
Some early results of the memory footprint improvements: #1219 (comment) |
Hi @martinlippert, when will you release vscode-spring-boot 1.54.0 to open-vsx? |
Done, thanks for the reminder. Looks like something went wrong unnoticed during the automation here. |
Thanks! |
Expected Behavior
Do not write heap dump files in case the user doesn't wants it. The user can disable this by a setting.
Current Behavior
The extension adds '-XX:+HeapDumpOnOutOfMemoryError' automatically:
https://github.com/spring-projects/sts4/blob/main/vscode-extensions/vscode-spring-boot/lib/Main.ts#L43
On cases where our users get OOM, their file system is blowing up with the hprof files. Can this be disabled by a setting? It can be set to true by default, and when a user wish to not have this files he can choose to disable it.
Context
We will use -XX:HeapDumpPath to write the files to some temp folder. But we need to be able to not have it written at all, as was on older versions of this extension. As our IDE is on cloud with shared resources it's problematic once this huge files are generated and blows up the disk.
The text was updated successfully, but these errors were encountered: