Confluence crashes or is slow due to CodeCache is full. Compiler has been disabled.

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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

Cause

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

Resolution

  1. 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.


  2. Restart the application for the new settings to take effect.
Last modified on Sep 25, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.