我刚得到Ubuntu 12.04LTS的新VM(Proxmox 1.9)实例。我做了以下事情:
跑步
$ grails
始终卡在:| Loading Grails 2.2.0
有时甚至达到| Configuring classpath
我只能使用kill -9 <pid>
/终止该过程:我也有以下异常(exception)情况:
$ grails
Exception in thread "Reference Handler" java.lang.IllegalMonitorStateException
at java.lang.Object.notifyAll(Native Method)
at java.lang.ref.ReferenceQueue.enqueue(ReferenceQueue.java:68)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:146)
$ free -m
total used free shared buffers cached
Mem: 4096 1129 2966 0 0 1129
-/+ buffers/cache: 0 4096
Swap: 0 0 0
$ java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
$ javac -version
javac 1.7.0_11
我试图寻找任何系统日志,但是没有运气...只是this Java log trace ...很长的一个http://pastebin.com/raw.php?i=YEesBGXn
使用以下JAVA_OPTS运行
$ echo $JAVA_OPTS
-verbose:gc -XX:+PrintGCDetails -Dgrails.env=development -server -Xmx512M -XX:MaxPermSize=256m
显示非常不寻常的垃圾回收,比本地机器上的快得多,仅第二秒钟就超过了30个周期! $ grails
[GC [DefNew: 13336K->933K(19648K), 0.0034700 secs] 13336K->933K(63360K), 0.0035060 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC [DefNew: 12566K->806K(19648K), 0.0029880 secs] 12566K->806K(63360K), 0.0030090 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 10728K->640K(19648K), 0.0020080 secs] 10728K->640K(63360K), 0.0020290 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10717K->625K(19648K), 0.0021550 secs] 10717K->625K(63360K), 0.0021740 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 11185K->895K(19648K), 0.0028080 secs] 11185K->895K(63360K), 0.0028280 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 11239K->966K(19648K), 0.0027430 secs] 11239K->966K(63360K), 0.0027640 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 11190K->959K(19648K), 0.0028930 secs] 11190K->959K(63360K), 0.0029140 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10801K->931K(19648K), 0.0027570 secs] 10801K->931K(63360K), 0.0027790 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 11730K->1483K(19648K), 0.0032850 secs] 11730K->1483K(63360K), 0.0033060 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 12693K->791K(19648K), 0.0036170 secs] 12693K->1286K(63360K), 0.0036380 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 10694K->623K(19648K), 0.0025120 secs] 11189K->1118K(63360K), 0.0025320 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10457K->596K(19648K), 0.0016330 secs] 10952K->1091K(63360K), 0.0016540 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10475K->604K(19648K), 0.0016960 secs] 10970K->1099K(63360K), 0.0017170 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10500K->621K(19648K), 0.0017230 secs] 10995K->1116K(63360K), 0.0017600 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11960K->848K(19648K), 0.0023630 secs] 12455K->1343K(63360K), 0.0023830 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC [DefNew: 10656K->736K(19648K), 0.0020860 secs] 11151K->1231K(63360K), 0.0021090 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 10706K->785K(19648K), 0.0022890 secs] 11201K->1330K(63360K), 0.0023100 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 12704K->1209K(19648K), 0.0031890 secs] 13249K->1754K(63360K), 0.0032090 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC [DefNew: 11009K->988K(19648K), 0.0030880 secs] 11555K->1737K(63360K), 0.0031090 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10910K->1042K(19648K), 0.0026880 secs] 11659K->1791K(63360K), 0.0027080 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 11699K->1233K(19648K), 0.0029880 secs] 12447K->1990K(63360K), 0.0030080 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11312K->1098K(19648K), 0.0032090 secs] 12069K->2088K(63360K), 0.0032280 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11480K->1169K(19648K), 0.0028980 secs] 12470K->2199K(63360K), 0.0029190 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC [DefNew: 11067K->996K(19648K), 0.0028780 secs] 12096K->2199K(63360K), 0.0028980 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10838K->987K(19648K), 0.0023150 secs] 12040K->2189K(63360K), 0.0023360 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10785K->989K(19648K), 0.0020500 secs] 11988K->2192K(63360K), 0.0020700 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10842K->1010K(19648K), 0.0020970 secs] 12044K->2212K(63360K), 0.0021170 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11668K->1184K(19648K), 0.0024270 secs] 12870K->2386K(63360K), 0.0024470 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11840K->854K(19648K), 0.0030320 secs] 13043K->2572K(63360K), 0.0030540 secs] [Times: user=0.00 sys=0.00, real=0.01 secs]
[GC [DefNew: 11890K->1345K(19648K), 0.0025590 secs] 13608K->3063K(63360K), 0.0025810 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 11306K->1007K(19648K), 0.0022660 secs] 13024K->3022K(63360K), 0.0022860 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 10991K->1059K(19648K), 0.0017130 secs] 13006K->3074K(63360K), 0.0017360 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 11440K->1255K(19648K), 0.0023460 secs] 13455K->3270K(63360K), 0.0023690 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 11989K->1298K(19648K), 0.0024010 secs] 14004K->3490K(63360K), 0.0024230 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 18770K->1948K(19648K), 0.0051470 secs] 20962K->4504K(63360K), 0.0051710 secs] [Times: user=0.02 sys=0.00, real=0.01 secs]
| Loading Grails 2.2.0
[GC [DefNew: 15322K->1119K(19648K), 0.0060270 secs] 18786K->5620K(63360K), 0.0060520 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 12134K->1357K(19648K), 0.0036970 secs] 16635K->5913K(63360K), 0.0037210 secs] [Times: user=0.01 sys=0.00, real=0.00 secs]
[GC [DefNew: 18695K->2148K(19648K), 0.0078430 secs] 23251K->7738K(63360K), 0.0078680 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 15902K->825K(19648K), 0.0071910 secs] 21492K->8544K(63360K), 0.0072170 secs] [Times: user=0.01 sys=0.00, real=0.01 secs]
[GC [DefNew: 10669K->815K(19648K), 0.0028670 secs] 18388K->8535K(63360K), 0.0028910 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
[GC [DefNew: 12030K->1121K(19648K), 0.0037650 secs] 19750K->8840K(63360K), 0.0037880 secs] [Times: user=0.00 sys=0.00, real=0.00 secs]
| Downloading: ivy-1.0.xml
| Downloading: ivy-3.2.3.xml
关于这里可能出什么问题的任何想法?谢谢一堆
阿米特
最佳答案
这不是Proxmox的问题,而是OpenVZ的问题。如果您使用Proxmox,建议您使用一个kvm实例。但是似乎OpenVZ对于IBM JDK来说还可以,也许您可以尝试IBM的Java运行时。您最好不要在OpenVZ中运行JVM。