<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: PermGen Nightmares</title>
	<atom:link href="http://www.symphonious.net/2007/06/20/permgen-nightmares/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.symphonious.net/2007/06/20/permgen-nightmares/</link>
	<description>Living in a state of accord.</description>
	<pubDate>Wed, 03 Dec 2008 01:41:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Odi</title>
		<link>http://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91382</link>
		<dc:creator>Odi</dc:creator>
		<pubDate>Wed, 20 Jun 2007 22:04:49 +0000</pubDate>
		<guid isPermaLink="false">https://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91382</guid>
		<description>Nuno, these options are only effective if you have enabled the *concurrent* mark and sweep GC (CMS) with -XX:+UseConcMarkSweepGC.</description>
		<content:encoded><![CDATA[<p>Nuno, these options are only effective if you have enabled the *concurrent* mark and sweep GC (CMS) with -XX:+UseConcMarkSweepGC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91350</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Wed, 20 Jun 2007 20:12:47 +0000</pubDate>
		<guid isPermaLink="false">https://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91350</guid>
		<description>Specifically with JDBC (since it's often the most common problem) - move any JDBC drivers in your webapps lib into Tomcat's common/lib folder instead.

This solved nearly all my (web) PermGen problems in one go ...</description>
		<content:encoded><![CDATA[<p>Specifically with JDBC (since it&#8217;s often the most common problem) - move any JDBC drivers in your webapps lib into Tomcat&#8217;s common/lib folder instead.</p>
<p>This solved nearly all my (web) PermGen problems in one go &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Odi</title>
		<link>http://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91204</link>
		<dc:creator>Odi</dc:creator>
		<pubDate>Wed, 20 Jun 2007 15:31:44 +0000</pubDate>
		<guid isPermaLink="false">https://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91204</guid>
		<description>Use JConsole to analyze if you have sized the memory pools according to your app needs. No need for a big heap if all you lack is PermGen. You may want to tune PermGen and CodeCache (that's for classes compiled by HotSpot): -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m

However, crashes due to PermGen OOM indicates a memory leak with class loading. Especially when redeploying WARs, the chances for class leaks are very big. If anything still has a reference to an object of your webapp, that effectively prevents unloading of its classloader and so all classes in the WAR. Common leaks are DB driver registrations with the JDBC driver manager, Swing listeners, SoftReferences, Objects in JNDI, RMI, unterminated threads, Logger instances, JMX beans, open sockets, open files. Use a heap analyzer (jmap / jhat) to find the dangling references.

But the PermGen inventors are not to blame. It's YOU not cleaning up properly.</description>
		<content:encoded><![CDATA[<p>Use JConsole to analyze if you have sized the memory pools according to your app needs. No need for a big heap if all you lack is PermGen. You may want to tune PermGen and CodeCache (that&#8217;s for classes compiled by HotSpot): -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=64m</p>
<p>However, crashes due to PermGen OOM indicates a memory leak with class loading. Especially when redeploying WARs, the chances for class leaks are very big. If anything still has a reference to an object of your webapp, that effectively prevents unloading of its classloader and so all classes in the WAR. Common leaks are DB driver registrations with the JDBC driver manager, Swing listeners, SoftReferences, Objects in JNDI, RMI, unterminated threads, Logger instances, JMX beans, open sockets, open files. Use a heap analyzer (jmap / jhat) to find the dangling references.</p>
<p>But the PermGen inventors are not to blame. It&#8217;s YOU not cleaning up properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno Sousa</title>
		<link>http://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91143</link>
		<dc:creator>Nuno Sousa</dc:creator>
		<pubDate>Wed, 20 Jun 2007 12:48:00 +0000</pubDate>
		<guid isPermaLink="false">https://www.symphonious.net/2007/06/20/permgen-nightmares/#comment-91143</guid>
		<description>Hi.

If you are using Sun's JVM, Garbage Collection for the Permanent Generation is switched off by default. Since you are using Tomcat and redeploying WAR files, tomcat also creates new class loaders, so it is a good thing to enable Class Unloading in the VM also -- this to is switched off by default.

In summary: add these options to the java command

-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled

Have fun,
Nuno</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>If you are using Sun&#8217;s JVM, Garbage Collection for the Permanent Generation is switched off by default. Since you are using Tomcat and redeploying WAR files, tomcat also creates new class loaders, so it is a good thing to enable Class Unloading in the VM also &#8212; this to is switched off by default.</p>
<p>In summary: add these options to the java command</p>
<p>-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled</p>
<p>Have fun,<br />
Nuno</p>
]]></content:encoded>
	</item>
</channel>
</rss>
