Skip to content

Commit 8df2a05

Browse files
authored
Merge pull request #443 from themkat/readme_improvements
Add a troubleshooting section in TROUBLESHOOTING.md for memory issues
2 parents 4bdd672 + ef1119c commit 8df2a05

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Any editor conforming to LSP is supported, including [VSCode](https://github.com
1515

1616
* See [BUILDING.md](BUILDING.md) for build instructions
1717
* See [Editor Integration](EDITORS.md) for editor-specific instructions
18+
* See [Troubleshooting](TROUBLESHOOTING.md) for tips on troubleshooting errors
1819
* See [Roadmap](https://github.com/fwcd/kotlin-language-server/projects/1) for features, planned additions, bugfixes and changes
1920
* See [Kotlin Quick Start](https://github.com/fwcd/kotlin-quick-start) for a sample project
2021
* See [Kotlin Debug Adapter](https://github.com/fwcd/kotlin-debug-adapter) for debugging support on JVM
@@ -107,6 +108,7 @@ The Kotlin language server supports some non-standard requests through LSP. See
107108
### Global symbols
108109
![Global symbols](images/GlobalSymbols.png)
109110

111+
110112
## Authors
111113
* [georgewfraser](https://github.com/georgewfraser)
112114
* [fwcd](https://github.com/fwcd)

TROUBLESHOOTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,13 @@ error TS6059: File '.../KotlinLanguageServer/bin/vscode-extension-src/...' is no
3232
```
3333

3434
delete the `bin` folder in the repository directory.
35+
36+
37+
## java.lang.OutOfMemoryError when running language server
38+
The language server is currently a memory hog, mostly due to its use of an in-memory database for symbols (ALL symbols from dependencies etc.!). This makes it not work well for machines with little RAM. If you experience out of memory issues, and still have lots of RAM, the default heap space might be too low. You might want to try tweaking the maximum heap space setting by setting `-Xmx8g` (which sets the heap size to 8GB. Change the number to your needs). This can be done by setting the `JAVA_OPTS` environment variable.
39+
40+
41+
In [the VSCode extension](https://github.com/fwcd/vscode-kotlin), this is in the extension settings in the setting `Kotlin > Java: Opts`.
42+
43+
44+
If you use Emacs, you can try the `setenv` function to set environment variables. Example: `(setenv "JAVA_OPTS" "-Xmx8g")`.

0 commit comments

Comments
 (0)