title: Out of memory exceptions Tomcat
body: <p>I have a Tomcat 7 with a few applications installed, for now it's usual to upload new versions of the applications pretty fast: so I pack the war and undeploy the existing one and deploy the new war or redeploy an existing application, The problem comes few weeks later when I see that the memory is almost full in order to prevent some unexpected outofmemory exceptions that makes our customers without service</p>
  
  <p>Do I have to restart time to time Tomcat? ¿Is that normal?
  Is there a <strong>pragmatic</strong> solution for zero Tomcat restarts?</p>
  
  <p>Please only expert answers</p>
  
  <p>UPDATE: This library can really help to avoid permgem issues and classloader leaks:
  <a href="https://github.com/mjiderhamn/classloader-leak-prevention" rel="nofollow">https://github.com/mjiderhamn/classloader-leak-prevention</a>, But remember that it's your responsability to not having leaks, there's no silver bullet. Visual VM can really help detecting classloader leaks.</p>