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

Explicitly report OutOfMemory error to user #1959

Closed
testforstephen opened this issue May 26, 2021 · 1 comment · Fixed by #2085
Closed

Explicitly report OutOfMemory error to user #1959

testforstephen opened this issue May 26, 2021 · 1 comment · Fixed by #2085
Assignees

Comments

@testforstephen
Copy link
Collaborator

When opening some large Java projects (e.g. https://github.com/Azure/azure-sdk-for-java) in VS Code, the language server may fail silently due to OutOfMemory error. The setting "java.jdt.ls.vmargs" of Java extension specifies a default "-Xmx1G" memory during starting language server, that's not enough for some large project. We need some way to explicitly tell user to increase the memory args in this case.

@rgrunber rgrunber self-assigned this Aug 18, 2021
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Aug 25, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#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 <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Aug 25, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#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 <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Aug 30, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#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 <rgrunber@redhat.com>
@rgrunber
Copy link
Member

rgrunber commented Sep 1, 2021

Relevant : microsoft/vscode-languageserver-node#688

rgrunber added a commit to rgrunber/vscode-java that referenced this issue Nov 13, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Nov 14, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Nov 14, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps, and
  offer to increase JVM XmX value

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Nov 15, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps (only if
  extension configured the location), and offer to increase JVM XmX
  value

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit to rgrunber/vscode-java that referenced this issue Nov 16, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes redhat-developer#1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps (only if
  extension configured the location), and offer to increase JVM XmX
  value

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
rgrunber added a commit that referenced this issue Nov 16, 2021
- Detect and report java.lang.OutOfMemory errors
- Fixes #1959
- Use -XX:+HeapDumpOnOutOfMemoryError & -XX:HeapDumpPath to generate a
  heap dump whose existence can notify the client that an OutOfMemory
  error has occured
- Use chokidar library to listen for heap dump files
- Once OutOfMemory error is detected, clean up the heap dumps (only if
  extension configured the location), and offer to increase JVM XmX
  value

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber added this to the Mid November milestone Nov 16, 2021
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

Successfully merging a pull request may close this issue.

2 participants