我在 Clojure 中运行一个网站。这里http://www.luminusweb.net/docs/deployment.md它说:
Note that by default JVM is fairly aggressive about memory usage. If you're like to reduce the amount of memory used then you can add the following line under the [Service] configuration:
[Service] ...
_JAVA_OPTIONS="-Xmx256m" ExecStart=/usr/bin/java -jar /var/myapp/myapp.jar
但是,将其添加到我的服务文件后,出现异常:
Unknown lvalue '_JAVA_OPTIONS' in section 'Service'
最佳答案
这是无效的systemd.service(5)句法。您可以使用另一个指令指定环境变量:
Environment=_JAVA_OPTIONS='-Xmx256m'
ExecStart=/usr/bin/java -jar /var/myapp/myapp.jar
关于java - Systemd: '_JAVA_OPTIONS' 节中的未知左值 'Service',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38402031/