Skip to content

Commit

Permalink
Merge pull request #443 from themkat/readme_improvements
Browse files Browse the repository at this point in the history
Add a troubleshooting section in TROUBLESHOOTING.md for memory issues
  • Loading branch information
fwcd committed Mar 29, 2023
2 parents 4bdd672 + ef1119c commit 8df2a05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Any editor conforming to LSP is supported, including [VSCode](https://github.com

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


## Authors
* [georgewfraser](https://github.com/georgewfraser)
* [fwcd](https://github.com/fwcd)
10 changes: 10 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ error TS6059: File '.../KotlinLanguageServer/bin/vscode-extension-src/...' is no
```

delete the `bin` folder in the repository directory.


## java.lang.OutOfMemoryError when running language server
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.


In [the VSCode extension](https://github.com/fwcd/vscode-kotlin), this is in the extension settings in the setting `Kotlin > Java: Opts`.


If you use Emacs, you can try the `setenv` function to set environment variables. Example: `(setenv "JAVA_OPTS" "-Xmx8g")`.

0 comments on commit 8df2a05

Please sign in to comment.