This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-20
Channels
- # announcements (3)
- # beginners (63)
- # calva (1)
- # cider (24)
- # clj-kondo (98)
- # cljdoc (8)
- # cljsrn (19)
- # clojure (106)
- # clojure-conj (2)
- # clojure-europe (5)
- # clojure-italy (5)
- # clojure-nl (8)
- # clojure-spec (8)
- # clojure-uk (13)
- # clojuredesign-podcast (7)
- # clojurescript (54)
- # core-async (1)
- # cursive (3)
- # data-science (1)
- # datomic (19)
- # fulcro (7)
- # hoplon (1)
- # off-topic (3)
- # re-frame (13)
- # reitit (1)
- # shadow-cljs (234)
- # test-check (10)
- # tools-deps (59)
- # unrepl (1)
- # yada (20)
In a really bizarre situation where giving a shadow-cljs project -Xmx4G
in project.clj
causes only M-x cider-jack-in-cljs
to fail about half the time. Values of 1G or 2G are 100% stable, as is running via lein dev
Is there a memory ceiling cider automatically sets & causes a self-kill? Part of the Emacs max memory setting? :thinking_face:
CIDER is pretty transparent in just formatting a call to your existing tooling. Check *Messages*
buffer for the exact command its running
I can find
[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.21.1 server...
But in the "self-kill" scenario (REPL suddenly closes with a shutting down..
message from shadow-cljs), I can't find any exception or errors to indicate why@dpsutton the question is whether emacs does anything else to monitor or limit the process in any way
it is started just fine but for some reason the process is killed when reaching a certain memory limit (and that is not shadow-cljs killing itself)
The shutting down ...
message is produced by shadow-cljs when the JVM Runtiome.addShutdownHook
thread is triggered
You can toggle nrepl-toggle-message-logging to see all the messages going back and forth
@quest on windows this was caused by someones anti-virus before. might also be something like that
its a subprocess of emacs right? Possible the os is mad at emacs and refusing to allocate memory?
I'll play around with some OSX Java options & other features to see if it affects it. *Messages*
output for a autokilled run:
[nREPL] Starting server via /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.21.1 server...
[nREPL] server started on 8777
[nREPL] Establishing direct connection to localhost:8777 ...
[nREPL] Direct connection to localhost:8777 established
Visit ‘’ in a browser? (y or n) n
[nREPL] Connection closed unexpectedly (connection broken by remote peer)
(for completeness, at the REPL)
[:app] Configuring build.
[:app] Compiling ...
shutting down ...
user>
*** Closed on Tue Aug 20 12:44:25 2019 ***
and running /usr/local/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.0 -d cider/cider-nrepl:0.21.1 server
from a command line behaves differently?
and the messages i'm talking about look like
(<--
id "96"
session "4448d1f0-b245-4a5d-81bd-4e710146a672"
time-stamp "2019-08-20 14:49:56.258862000"
docstring "Returns the sum of nums. (+) returns 0."
eldoc (nil
("x")
("x" "y")
("x" "y" "&" "more"))
name "+"
ns "cljs.core"
status ("done")
type "function"
)
(<--
id "97"
session "4448d1f0-b245-4a5d-81bd-4e710146a672"
time-stamp "2019-08-20 14:49:56.259385000"
docstring "Returns the sum of nums. (+) returns 0."
eldoc (nil
("x")
("x" "y")
("x" "y" "&" "more"))
name "+"
ns "cljs.core"
status ("done")
type "function"
)
hmm, behaves the same -- ran it, then used M-x cider-connect-cljs
& specified app
as per usual. same REPL output (shutting down ...), though I get a java.net.SocketException: Socket closed
at the console
well i think you've found its not CIDER related. just running from command line and viewing the app causes the shutdown?
try running from command line and connect from browser. if it fails, remove cider/cider-nrepl and rerun. if it fails then its not CIDER's fault. not sure from your message if you've tried that or not
Running with /usr/local/bin/npx shadow-cljs watch app
still produces a kill
> /usr/local/bin/npx shadow-cljs watch app
shadow-cljs - config: /Users/quest/repos/ns/browser/shadow-cljs.edn cli version: 2.8.46 node: v12.8.0
shadow-cljs - running: lein run -m shadow.cljs.devtools.cli --npm watch app
shadow-cljs - HTTP server available at
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.8.45 running at
shadow-cljs - nREPL server started on port 8777
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (608 files, 1 compiled, 0 warnings, 4.10s)
shutting down ...
Worker shutdown.
running lein dev
reliably works with 4G, and it's configured as so under :aliases
"dev" ["with-profile" "dev" "run" "-m" "shadow.cljs.devtools.cli" "watch" "app"]
still confused but leaning away from this being cider related -- thanks for the help @dpsutton