Note that there are some explanatory texts on larger screens.

plurals
  1. POPermgen Memory Leak with hot redeploy and Oracle database
    primarykey
    data
    text
    <p>i've got a SpringRoo-based application that is running in a production environment, that is causing severe permgen memory leaks after some hot redeploys.</p> <p>In order to "find and fix" the leak and to reduce the variables during analysis, i've created a simple, streamlined application using roo, and i obtain the same behaviour. The project (created with Spring Roo (1.2.3.RELEASE)) simply persists an entity called 'Person' with a string field called 'name'.</p> <p>I deploy the war on a Tomcat 7.0.39, using Oracle 11.2.0.2 as the database. After every re-deploy, i get this message in catalina.out</p> <pre><code>INFO: Undeploying context [/ojdbc-0.1.0.BUILD-SNAPSHOT] mag 06, 2013 10:50:43 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc SEVERE: The web application [/ojdbc-0.1.0.BUILD-SNAPSHOT] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. </code></pre> <p>After two hot-redeploys, i get a <em>permgen error</em>:</p> <pre><code>mag 06, 2013 10:51:08 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive /Applications/apache-tomcat-7.0.39/webapps/ojdbc- 0.1.0.BUILD-SNAPSHOT.war Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" Exception in thread "RMI TCP Connection(idle)" mag 06, 2013 10:51:17 AM ServerCommunicatorAdmin reqIncoming WARNING: The server has decided to close this client connection. java.lang.OutOfMemoryError: PermGen space Exception in thread "RMI TCP Connection(idle)" java.lang.OutOfMemoryError: PermGen space </code></pre> <p>I've tried to analyze this with VisualVm / EclipseMemory Analyzer, and this is what i get so far.</p> <p><img src="https://i.stack.imgur.com/1mZBS.png" alt="VisualVM screnshot with PermGen behaviour"></p> <p><img src="https://i.stack.imgur.com/diiBB.png" alt="GC Roots obtained from dominator tree analysis"></p> <p>The fact is that i don't observe this behaviour with another database (for example PostgreSQL or Hypersonic). Is there something related to Oracle that is causing the leak?</p> <p><a href="https://dl.dropboxusercontent.com/u/824575/leak.zip" rel="nofollow noreferrer">Here</a> is a zip archive containing roo script generator, anche the .hprof dump file.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload