首页 > 解决方案 > with cloure lein ring server, how to set max heapsize when starting the web appication?

问题描述

So when I start the cloure web application with the command lein ring server, there are 2 processed that get started.enter image description here

The first process is clojur.main that then runs the main web application. The jvm options

:jvm-opts ["-Xmx128m"  "-server"]

for ring work to control the memory for the web application. The issue is that the clojure.main -m leingen.core.main allocates 300+ MB of heap space. (see screenshot 32)

enter image description here

标签: clojureleiningenring

解决方案


好吧,没关系

显然我应该运行 lein trampoline ring server

这样leingen就可以走开,节省内存


推荐阅读