sql >> Base de Datos >  >> RDS >> Oracle

Fuga de memoria de Permgen con redistribución en caliente y base de datos de Oracle

Intente mover el controlador Oracle JDBC al directorio lib de Tomcat en lugar de estar dentro de la carpeta lib de la aplicación. Parece que OracleDiagnosabilityMBean está controlando a Catalina.

Editar:dado que no tiene control sobre Tomcat, intente ajustar dónde se cargan las clases de Oracle de esta manera (excepto reemplazar el AppContext para su inicio de Oracle):

http://cdivilly.wordpress.com/2012/04/ 23/permgen-memory-leak/

//somewhere in application startup, e.g. the ServletContextListener
try {
 final ClassLoader active = Thread.currentThread().getContextClassLoader();
 try {
  //Find the root classloader
  ClassLoader root = active;
  while (root.getParent() != null) {
   root = root.getParent();
  }
  //Temporarily make the root class loader the active class loader
  Thread.currentThread().setContextClassLoader(root);
  //Force the AppContext singleton to be created and initialized
  sun.awt.AppContext.getAppContext();
 } finally {
 //restore the class loader
 Thread.currentThread().setContextClassLoader(active);   
}
} catch ( Throwable t) {
   //Carry on if we get an error
   LOG.warning("Failed to address PermGen leak");
}