CodeCache がいっぱいになっているため、Confluence がクラッシュするか、遅くなっている。コンパイラが無効になっている。
症状
The instance may crash, become slow or unresponsive. The following entries can be found in the tomcat logs, catalina.out:
Java HotSpot(TM) 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.
Java HotSpot(TM) 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=
CodeCache: size=262144Kb used=259876Kb max_used=259916Kb free=2267Kb
bounds [0x00007f03f4000000, 0x00007f0404000000, 0x00007f0404000000]
total_blobs=53566 nmethods=51437 adapters=2034
compilation: disabled (not enough contiguous free space left)
PS : An instance might still be impacted by this issue even when the above error is not showing up in the logs.
The following appears on the thread dumps:
"C2 CompilerThread0" #6 daemon prio=5 tid=0x000000001ab9c000 nid=0xcfc waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
原因
This issue is rare but it can occasionally happen when the Java CodeCache becomes full. A full explanation of this issue can be read here.
ソリューション
Add the following arguments to the Java startup options by following the instructions on Configuring System Properties
-XX:ReservedCodeCacheSize=384m
On larger Confluence instances it may be necessary to increase CodeCache further. We have yet to experience any consequences because of this besides the use of more system memory.
- Restart the application for the new settings to take effect.