Full CodeCache causes Jira to crash or perform slowly

お困りですか?

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

コミュニティに質問

要約

The instance may crash, become slow, or become 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 present 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

環境

All versions of Jira (Server and Data Center)

原因

This issue is rare but it can occasionally happen when the Java CodeCache becomes full.

ソリューション

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
  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 full CodeCache messages after the steps above, you may increase it even further. Some large Jira instances may require  more than 512m.

We have yet to experience any consequences because of this besides the use of more system memory.

If past 1024m the error still happens, please contact Atlassian Support








最終更新日 2023 年 7 月 21 日

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

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