title: Which java garbage collector we should use for spring boot with java 11 and Ubuntu 18
body: <p>We have 10 spring boot applications which are running on ubuntu18 with 8GB RAM and Java 11.</p>
  
  <p>We are running the apps using java garbage collector <strong>-XX:+UseSerialGC</strong> without restricting the heap space.</p>
  
  <p>But after few days server memory fully consumed and server got hanged.</p>
  
  <p>Do we need to restrict the heap memory if we are using garbage collector ?</p>
  
  <p>I have tried with other garbage collectors also but nothing working except +UseSerialGC.</p>