JRUBY JAVA HEAP SPACE 内存不足错误



如何调整 Java 堆内存?
我已经试过了

jruby -J-Xmn512m -J-Xms2048m -J-Xmx2048m -S rails s

但它没有用

memory 参数应如下所示:

-Xms1024m - the init memory allocate when the JVM start
-Xmx2048m - the max memory that the JVM can allocate

还使用:

-XX:MaxNewSize - it could be 30% of the Xmx value:

-XX:MaxNewSize(在JDK1.3和JDK1.4中)或-Xmn(从JDK1.4开始的年轻一代旗帜的新名称)。增加-Xmn(年轻一代区域)有助于应用程序创建短生存对象(较少缓存的应用程序)的情况,因为它增加了次要GC的时间,大多数应用程序对象会提前死亡。

注意:您可以输入您的赢取值。

最新更新