Full CodeCache causes Jira server to crash or perform slowly

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

The instance may crash, become slow or unresponsive. The following entries can be found in the atlassian-jira.log:

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=

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 where the compiler threads would be in the runnable state and consuming CPU.

"C2 CompilerThread0" #6 daemon prio=5 tid=0x000000001ab9c000 nid=0xcfc runnable [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. We have also been seeing this value need to be increased when using Java 8 and JIRA 6.3+.

ソリューション

Starting from Jira 7.13, the following properties are in the  setenv.sh / .bat file by default. This should solve the problems with the code cache in most environments. We've specified the reserved size as 512m. If you're still getting this error, try increasing the size even more.


  1. Add the following arguments to the Java startup options by following the instructions on Setting Properties and Options on Startup:

    -XX:ReservedCodeCacheSize=512m

    On larger JIRA 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.


  2. Clear catalina.out log file under <JIRA_INSTALL>/logs directory because the health check may be responding to outdated messages in catalina.out.
  3. Restart the application for the new settings to take effect.

If you still get the warning message due to a full code cache size, raise a ticket to Atlassian Support for further investigation.

最終更新日 2020 年 1 月 29 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.