-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gracefully handle OutOfMemory errors
- Detect and report java.lang.OutOfMemory errors - Fixes #1959 - Use -XX:+ExitOnOutOfMemoryError to ensure Java language server exits when an OutOfMemory error occurs (rather than staying up) - Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a heap dump whose existence can notify the client that an OutOfMemory error has occured - Once OutOfMemory error is detected, clean up the heap dumps Signed-off-by: Roland Grunberg <[email protected]>
- Loading branch information
Showing
5 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# The Language Server Crashes Due to an Out Of Memory Error | ||
|
||
If you are working with large Java project, this may lead to the language server running out of memory. | ||
|
||
If you get an Out of Memory Error, but aren't working with a large project, then there may be a memory leak in the language server. | ||
Please [file a issue](https://github.com/redhat-developer/vscode-java/issues) with a description of what you were doing if this is the case. | ||
|
||
## How to increase the amount of memory available to the Java Language Server | ||
|
||
1. Go to settings | ||
2. Navigate to the setting `java.jdt.ls.vmargs` | ||
3. Add `-Xmx2G` to the setting string. This allows the the language server to use at most 2 Gigabytes of memory. | ||
4. If the problem persists, you can increase the `2G` to `4G` or higher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters