title: java.lang.OutOfMemoryError: Compressed class space
body: <p>We are running on java-8-oracle.</p>
  
  <p>We moved to java8 six month ago.</p>
  
  <p>In the past few days we have been getting an OOME from time to time and we haven't been able to identify or reproduce the problem.</p>
  
  <p>When we execute a call to the server (tomcat) we get this error on the stacktrace:</p>
  
  <pre><code>java.lang.OutOfMemoryError: Compressed class space
  </code></pre>
  
  <p>Restarting the server solves the problem. The same call to other server works, and so does another call of another type to the same server.</p>
  
  <p>When looking on the gc.log we see:</p>
  
  <pre><code>2015-05-27T16:05:42.991+0000: 98774.440: [Full GC (Last ditch collection) 98774.440: [CMS: 575745K-&gt;575330K(3495936K), 0.8687777 secs] 575745K-&gt;575330K(4107008K), [Metaspace: 97940K-&gt;97940K(1396736K)], 0.8696093 secs] [Times: user=0.95 sys=0.00, real=0.88 secs]
  2015-05-27T16:05:55.486+0000: 98786.935: [Full GC (Metadata GC Threshold) 98786.935: [CMS: 573414K-&gt;578735K(3495936K), 0.9372859 secs] 925046K-&gt;578735K(4107008K), [Metaspace: 99428K-&gt;99428K(1396736K)], 0.9386626 secs] [Times: user=1.01 sys=0.00, real=0.94 secs]
  </code></pre>
  
  <p><code>jstat -gc</code> returns:</p>
  
  <pre><code> S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT
  87296.0 87296.0  0.0   3151.4 523776.0 148284.4 3495936.0   574868.5  1395640.0 98066.3 1048576.0 11339.1  12165  636.851  223   116.957  
  
  753.808
  </code></pre>
  
  <p>I don't see any memory problems either in the jstat log or in the gc log.</p>
  
  <p>Trying to run <code>jmap -clstats</code> hangs:</p>
  
  <pre><code>Attaching to process ID 5110, please wait...
  Debugger attached successfully.
  Server compiler detected.
  JVM version is 25.25-b02
  finding class loader instances ..
  </code></pre>