title: Java - PS OldGen full, PS Survivor Space empty, PS Eden Space filling and GC'ing
body: <p>I am running Atlassian Bitbucket on tomcat 8.0.24 and Java 1.8.0 31-b13 (64 bit) on Ubuntu 14.04.5 LTS, kernel 3.13.0-88-generic. The VM has 16GBytes of memory and 4 virtual CPUs</p>
  
  <p>The only java parameters I have modified are the heap parameters, currently  -Xms3072m -Xmx4096m.  I have not changed ratios or other heap parameters</p>
  
  <p>I am using probe to view the internals.  After restart GC works as expected on the PS Eden Space and PS Survivor Space with PS Old Gen gradually filling to 2.67GBytes and a full GC happening.</p>
  
  <p>However after a few days of expected behaviour, PS Old Gen fills but no GC happens and then PS Survivor SPace remains empty with only PS Eden Space filling and GC'ing. Sometime after this behaviour is observed response times slow and eventually it crashes with out of memory (heap) errors.</p>
  
  <p>I have been gradually increasing the heap space but am acutely aware that it is now quite large and full GCs cause the front end to report an outage for several seconds while it is occurring.</p>
  
  <p>My questions are:</p>
  
  <ol>
  <li>Should I keep increasing the heap, hoping this will solve the problem?</li>
  <li>Are there other parameters (such as the various ratios) that might assist in solving this problem?</li>
  <li>Should I risk death and recommend we ditch Bitbucket as a crock?  :-)</li>
  </ol>