This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-23
Channels
- # announcements (2)
- # babashka (25)
- # beginners (33)
- # biff (13)
- # calva (13)
- # clerk (82)
- # clj-commons (3)
- # clj-kondo (8)
- # clj-on-windows (23)
- # cljdoc (6)
- # clojure (16)
- # clojure-belgium (1)
- # clojure-dev (58)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (2)
- # clojurescript (17)
- # core-async (5)
- # cursive (6)
- # datahike (1)
- # datomic (8)
- # emacs (25)
- # etaoin (21)
- # events (4)
- # graalvm (33)
- # honeysql (7)
- # hyperfiddle (1)
- # lsp (49)
- # luminus (4)
- # malli (18)
- # off-topic (63)
- # reagent (11)
- # releases (1)
- # shadow-cljs (200)
- # timbre (1)
- # tools-build (17)
I'm having an issue setting up clojure-lsp on wsl in windows. I'm downloading the https://github.com/clojure-lsp/clojure-lsp/releases/tag/2023.01.26-11.08.16
curl -L -O .
16/clojure-lsp-native-static-linux-amd64.zip
and then unzipping it into ~/bin
which is on my path and on emac's exec path. Clojure lsp starts up correctly, analyzes the project and then dies. I'm greeted with the following message:
> Server clojure-lsp:4111/starting exited (check corresponding stderr buffer for details). Do you want to restart it? (y or n) n
The server output has lots of output that looks like regular analyzing. The buffer *clojure-lsp::stderr*
has
> Process clojure-lsp stderr finished
I'm not sure what else to look at to figure out why it seems to just be exiting.usuing the january release to work around the defcatchall bug. still haven't fixed that quite yet
Did you check the https://clojure-lsp.io/troubleshooting/#server-log?
That's weird, no exceptions, does the same happens running via CLI?
clojure-lsp diagnostics
for exampletry which clojure-lsp
in a wsl(2?? please specify the 2 if you're using wsl2, wsl is a completely different thing) console
wsl2 (sorry about that) from an emacs eshell:
~ $ which clojure-lsp
/home/dan/bin/clojure-lsp
~ $ clojure-lsp --version
clojure-lsp 2023.01.26-11.08.16
clj-kondo 2023.01.20
and same output from a wsl2 terminalcould you tryhttps://clojurians.slack.com/archives/CPABC1H61/p1679586629706379?thread_ts=1679586389.160669&cid=CPABC1H61?
i missed that originally @UKFSJSM38 sorry about that. What a great diagnostic tool.
clojure-lsp diagnostics
[ 20%] Analyzing project files Killed
> Exit code 137 occurs when a process is terminated because it's using too much memory.
from my blog:
Some closing tips.
There is a known issue with memory usage of WSL2. Since linux uses non-allocated memory for filesystem caching, Windows thinks this memory is really used. As time goes by, Windows could end up allocating all your system's memory to WSL2. To put a limit to this, I use this config in C:\Users\borkdude.wslconfig:
[wsl2]
memory=92GB
https://blog.michielborkent.nl/remote-wsl2-clojure.htmli don't but don't have a ton to start with. inheriting wife's old computer so will have to bump that
I mean 8-16gb should be enough I think, but my PC has 128gb so why not give it more ;)
I configured WSL2 to get 20GB on my 32GB Windows desktop (and 12GB on my 16GB Windows laptop I think). If you have 16GB, then configuring it to 12GB should be plenty for most stuff... I can run a lot of things that way.
But moar RAM is always better 🙂
I thought it automatically used half of total RAM...? But maybe it's just half of free RAM? @U04V15CAJ?
i think it had 8gb of the 16. But with slack, chrome, spotify in the windows os, then clojure-lsp, the clojure backend, node running the frontend, postgres, it just got to be too much
Yeah, I can imagine. Here's my 32GB desktop right now:
Slack, Edge, Docker (running Elastic Search, MySQL/Percona, and Redis), multiple Terminals each running REPLs etc, Mail, Calendar, Zoom, To Do, VS Code (three instances).
I think the max memory setting isn't enforced by default, at least it was like this when I started with wsl2, but it could be that it is done now.
"By default the WSL2 will consume up to 50% of your total system memory (or 8GB whichever is lower)." -- so it won't use more than 8GB unless you configure it to do so, even on large systems.
https://learn.microsoft.com/en-us/windows/wsl/wsl-config for all the juicy details...
@U11BV7MTK In particular localhostForwarding
(defaults to true
) re: our earlier conversation about using localhost
on Windows.