Out of memory in PlayFramework 2.0

前端 未结 3 2269
眼角桃花
眼角桃花 2021-02-13 07:14

How do I increase the memory available to the Play environment? I am running out of memory after a time while running tests.

In particular, I get this error:

3条回答
  •  天命终不由人
    2021-02-13 07:57

    By setting the environment variable "_JAVA_OPTIONS", you can pass in variables that play/sbt will use during normal use. I found that this helped me avoid PermGen space errors when running my dev and tests.

    For example:

    export _JAVA_OPTIONS="-Xms64m -Xmx1024m -Xss2m -XX:MaxPermSize=256m"

提交回复
热议问题