Setting JVM parameters in application.conf

646 views
Skip to first unread message

peng.j...@gmail.com

unread,
May 19, 2016, 3:25:38 PM5/19/16
to play-framework
Hi all,

We are trying to find out how to set JVM parameters with some configuration file, so our play apps can share the same configuration without typing it out. We find that in very early version of play, there is one parameter called jvm.memory to set up the heap size. So, can we still set such parameters in application.conf or somewhere else? Your answers will be highly appreciated!

Thanks,
Peng

Greg Methvin

unread,
May 19, 2016, 3:50:42 PM5/19/16
to play-framework
I think jvm.memory was a play 1 option. I know little about the internals of Play 1.x, but IIRC it uses a python script to read options like that and then starts the JVM. In Play 2.x, the Play server itself reads the configuration, so unfortunately you can't use the application configuration to do it.

If you use a forked JVM in SBT, you can add your javaOptions in SBT. You can also configure JVM options for sbt-native-packager ("sbt dist") that define which options are passed to your native start script.

I hope that helps.

Greg

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/a5a93967-cb87-4d45-be37-a0cc64e8766d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Methvin
Senior Software Engineer

peng.j...@gmail.com

unread,
May 19, 2016, 4:21:55 PM5/19/16
to play-framework
Thank you very much Greg! We will try your solution.

Best,
Peng 
Reply all
Reply to author
Forward
0 new messages