我们的一个客户在尝试启动第二个java进程时遇到了这个错误消息。
Error occurred during initialization of VM
Could not reserve enough space for object heap
如果第一个进程没有运行,启动第二个进程的命令可以正常工作。这里是用于启动第二个进程的命令:
第一个进程作为Windows服务启动。我不知道一个显示服务的启动命令的好方法,它很可能执行我们的启动批处理文件。通过查看批处理文件,似乎正在使用以下Java选项:
-Xms1g -Xmx1g -Xss256K -Xverify:none -XX:+TieredCompilation -XX:+UseBiasedLocking
-XX:+UseParNewGC -XX:InitialCodeCacheSize=8m -XX:ReservedCodeCacheSize=32m
-Dorg.terracotta.quartz.skipUpdateCheck=true
服务启动时还会显示以下警告:
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
这也很奇怪,因为我没有看到其他系统的警告。
平台为jdk1.8.0_111,windowsembedded2010。
问题是:
-
为什么在该计算机上发出UseParNewGC警告,而其他计算机上没有?