<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>intuitive engineering &#187; java</title>
	<atom:link href="http://dougmunsinger.com/tag/java/feed" rel="self" type="application/rss+xml" />
	<link>http://dougmunsinger.com</link>
	<description>doug munsinger</description>
	<lastBuildDate>Fri, 13 Jan 2012 17:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PermGen space error in jBoss</title>
		<link>http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html</link>
		<comments>http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html#comments</comments>
		<pubDate>Thu, 22 Jan 2009 21:53:42 +0000</pubDate>
		<dc:creator>doug</dc:creator>
				<category><![CDATA[jboss]]></category>
		<category><![CDATA[move4]]></category>
		<category><![CDATA[move7]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://dougmunsinger.com/?p=596</guid>
		<description><![CDATA[&#160; &#8220;java.lang.OutOfMemoryError: PermGen space&#8221; First the application was acting really slow and sluggish, then stopped responding &#8211; in looking at the log we saw &#8220;java.lang.OutOfMemoryError: PermGen space&#8221; as soon as the application was accessed. The resolution was to set &#8220;-XX:MaxPermSize=128m&#8221; in the startup script. to the string sizing the jBoss server is now: &#8220;-server -Xms256m [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&#8220;java.lang.OutOfMemoryError: PermGen space&#8221;</p>
<p>First the application was acting really slow and sluggish, then stopped responding &#8211; in looking at the log we saw &#8220;java.lang.OutOfMemoryError: PermGen space&#8221; as soon as the application was accessed.  </p>
<p>The resolution was to set &#8220;-XX:MaxPermSize=128m&#8221; in the startup script.  </p>
<p> to the string sizing the jBoss server is now: &#8220;-server -Xms256m -Xmx768m -XX:MaxPermSize=128m&#8221;, and that error is gone.  </p>
<p>In looking for more data I <a href="http://ika.motime.com/post/494144/Explaining+java.lang.OutOfMemo" title="Ika's Blog entry on Perm Gen error">found</a>:</p>
<blockquote>
<p> One more interesting flavor of the same error message, less common but hence even more troublesome is: &#8220;java.lang.OutOfMemoryError: PermGen space&#8221;. Most of the memory profiler tools are unable to detect this problem, so it is even more troublesome and therefor &#8211; interesting.</p>
<p>To understand this error message and fix it, we have to remember that, for optimized, more efficient garbage-collecting Java Heap is managed in generations &#8211; memory segments holding objects of different ages.</p>
<p>Garbage collection algorithms in each generation are different. Objects are allocated in a generation for younger objects &#8211; the Young Generation, and because of infant mortality most objects die there. When the young generation fills up it causes a Minor Collection. Assuming high infant mortality, minor collections are garbage- collected frequently.</p>
<p>Some surviving objects are moved to a Tenured Generation. When the Tenured Generation needs to be collected there is a Major Collection that is often much slower because it involves all live objects. Each generation contains variables of different length of life and different GC policies are applied to them.</p>
<p>There is a third generation too &#8211; Permanent Generation. The permanent generation is special because it holds meta-data describing user classes (classes that are  ot part of the Java language). Examples of such meta-data are objects describing classes and methods and they are stored in the Permanent Generation.</p>
<p>Applications with large code-base can quickly fill up this segment of the heap which will cause java.lang.OutOfMemoryError: PermGen no matter how high your -Xmx and how much memory you have on the machine.</p>
<p>Sun JVMs allow you to resize the different generations of the heap, including the permanent generation. On a Sun JVM (1.3.1 and above) you can configure the initial permanent generation size and the maximum permanent generation size.</p>
<p>To set a new initial size on Sun JVM use the -XX:PermSize=64m option when starting the virtual machine. To set the maximum permanent generation size use -XX:MaxPermSize=128m option. If you set the initial size and maximum size to equal values you may be able to avoid some full garbage collections that may occur if/when the permanent generation needs to be resized. The default values differ from among different versions but for Sun JVMs upper limit is typically 64MB.</p>
</blockquote>
<p>&nbsp;</p>
<p>&mdash; dsm</p>
<div class="addtothis"><p>
				<table cellspacing="0" cellpadding="0" border="0" style="width: 180px; height: 30px; text-align: left; margin-left: 0px; ">
				<tbody>
				<tr>
				<td style="text-align: center;">
				<a href="http://www.stumbleupon.com/submit?url=http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html&title=PermGen space error in jBoss" rel="nofollow">
                                <img src="http://dougmunsinger.com/wp-content/plugins/addtothis/stumble.png" title="Add to Stumble Upon" alt="Stumble It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://del.icio.us/post?url=http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html&title=PermGen space error in jBoss" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/delicious.png" title="Add to Del.icio.us" alt="Add to Del.cio.us" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://technorati.com/faves?add=http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/technorati.png" title="Add to Technorati" alt="Add to Technorati Favorites" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://digg.com/submit?phase=2&url=http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/digg.png" title="Add to Digg" alt="Digg It!" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				<td style="text-align: center;">
				<a href="http://dougmunsinger.com/feed/rss" rel="nofollow">
				<img src="http://dougmunsinger.com/wp-content/plugins/addtothis/feeds.png" title="Add Feed to Bookmarks" alt="RSS Feed" style="border: 0px solid ; width: 28px; height: 28px;"/>
				</a>
				</td>
				</tr>
				</tbody>
				</table>

                
		
				</p></div>]]></content:encoded>
			<wfw:commentRss>http://dougmunsinger.com/2009/01/permgen-space-error-in-jboss.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

