I've got a running sbt project that can start my server using re-start. The setup was done using the xsbt-web-plugin.
Now I noticed that the server process runs with a heap of 128M which is a little short. I know how to configure the heap size for the sbt process, but apparently spray is running a different jvm.
How do I configure a larger heap for spray-can in this kind of setup?
Details
I've configured my sbt like I answered here: How to specify JVM maximum heap size "-Xmx" for running an application with "run" action in SBT?
BUT when I look at the running processes with jconsole I can see that the server process is running in a different jvm:
And I can see that this process has a heap of only 128M instead of the 3.5G I configured in .sbtconfig.
It is possible to fix this by setting the javaOptions for forked JVMs
If you want to be more particular about different processes you can use something like
But I haven't found which value you should pass to
in
yet.