SBT with Memory
I am having problem with running SBT run command. Because I need to load some machine learning models. Actually there are a lot of models.
One option is that I need to put something like in the current project root.
>cat .sbtopts
-J-Xmx8G
-J-XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled
-J-Xss2M -Duser.timezone=GMT
-jvm-debug 5008
Then command works
> sbt clean update compile -Dhttp.port=8003 run
Production Memory Configuration
These parameters help
> bin/classifier-play -Dconfig.file=conf/application.conf -Dhttp.port=8003 -Dhttp.address=0.0.0.0 -J-Xms1024M -J-Xmx8g -J-server
References:
http://stackoverflow.com/questions/8331135/how-to-prevent-java-lang-outofmemoryerror-permgen-space-at-scala-compilation
https://medium.com/@jan______/sbtconfig-is-deprecated-650d6ff10236#.b1armdw6q
http://stackoverflow.com/questions/21647394/java-lang-outofmemoryerror-permgen-space-in-play-framework
https://www.playframework.com/documentation/2.4.3/ProductionConfiguration#JVM-configuration
SBT with Memory
猜你喜欢
转载自sillycat.iteye.com/blog/2253154
今日推荐
周排行