This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-24
Channels
- # announcements (12)
- # aws (11)
- # babashka (1)
- # beginners (73)
- # cider (4)
- # clj-kondo (2)
- # cljsrn (4)
- # clojars (2)
- # clojure (68)
- # clojure-europe (8)
- # clojure-nl (5)
- # clojure-spec (6)
- # clojure-sweden (1)
- # clojure-uk (29)
- # clojurescript (41)
- # conjure (22)
- # crux (46)
- # datomic (33)
- # docker (58)
- # duct (3)
- # emacs (8)
- # events (1)
- # expound (3)
- # figwheel-main (5)
- # fulcro (33)
- # graphql (2)
- # kaocha (2)
- # lambdaisland (39)
- # leiningen (1)
- # nrepl (49)
- # nyc (1)
- # off-topic (77)
- # pathom (1)
- # re-frame (33)
- # reagent (28)
- # reitit (1)
- # rewrite-clj (2)
- # shadow-cljs (195)
- # spacemacs (1)
- # sql (60)
- # tools-deps (13)
- # vim (18)
@kwladyka I'd try to restrict docker container running on your local host to 60 MB or something like that and see if it still works.
When I tried a simple app I couldn't get it work on less than ~130 MB.
JVM process consumes much more than just heap memory (see my SO answer with very useful links: https://stackoverflow.com/questions/62303368/accounting-for-java-memory-consumption/62307787#62307787) - e.g. during startup Clojure apps tend to load lots of classes and thus Metaspace consumption will be likely at least 20-30 MB.
I didn't notice if you mentioned what JDK you're using and if you tune heap size - see XX:MaxRAMPercentage
in particular (70% as mentioned by @lukaszkorecki is a good value in my experience)
To sum up: to run anything in prod I'd give it at least 256 MB of ram
yes, I wanted to try also Metaspace limits, BUT I can’t understand why the same image work on my localhost with 128M and not in google cloud run with 128M or even 256M, it needs 512M
Why use XX:MaxRAMPercentage
vs let java (new ver. like 11 / 14 / 15) do what it want?
It's my preference but I think 70% is usually ok - but I haven't used it in environments with such restricted RAM capacity; For me it's always 1+ GB of ram available on the machine.
Do you know how to run my Java app throw some tool which will give me full debug about memory consumption before memory exceed? I mean I want to see something useful. Running app directly gives me nothing, so I could run app by another app (tool) which will log constantly memory usage. But immediately without delay, because memory exceed kill the container. Any idea ?