-
Notifications
You must be signed in to change notification settings - Fork 82
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
Handle OOM in Java language server #548
Conversation
@fbricon it seems like it isn't possible to do anything on the lemminx side when we hit an OOM Error. By crashing lemminx and checking for the heap dump, we can notify the user that its an OOM and prevent the server from restarting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worked pretty well for me. I think it's a good first step. We might be able to improve things if the language server client had a nice way to access the exit code of the LS executable, but not possible for now it seems.
ecd46d3
to
255f41d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a minor detail to change.
Just wondering (whether it's possible, and worth it), if a user does set -XX:HeapDumpPath=..
, could we listen to that location for newly added files ?
255f41d
to
fa7d432
Compare
fa7d432
to
262c733
Compare
I implemented a strategy that listens to the HeapDumpPath specified by the JVM arguments if the user sets it there. Unlike when the argument is set in the typescript code, it won't delete the heap dumps that are generated, since presumably the user wants to read them. |
96e1890
to
f0bf439
Compare
05ff7e8
to
93bac0f
Compare
@fbricon does this PR work for you? You should see a popup when the language server crashes due to an OOM Error |
93bac0f
to
a744381
Compare
21e623c
to
6807407
Compare
6807407
to
5f681e5
Compare
5f681e5
to
35fa646
Compare
I can confirm that data would be broadcast correctly upon crash, and for opening the link. @fbricon , if you're fine with this, I think we can probably merge. |
35fa646
to
9ff75c6
Compare
Add parameters to the java server to make lemminx crash when it runs out of memory. Detect when the java server shuts down due to running out of memory, display a message to the user that this happened, and don't attempt to restart the server. Closes redhat-developer#527 Signed-off-by: David Thompson <[email protected]>
9ff75c6
to
6b7b620
Compare
I think we can merge this now. |
Add parameters to the java server to make lemminx crash when it runs out of memory. Detect when the java server shuts down due to running out of memory, display a message to the user that this happened, and don't attempt to restart the server.
Closes #527
Signed-off-by: David Thompson [email protected]