<?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>Web2.0 Tutorials &#187; maximum memory pool</title>
	<atom:link href="http://www.zulutown.com/blog/tag/maximum-memory-pool/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zulutown.com/blog</link>
	<description>All the Guides You Need to Become a Web2.0 Expert</description>
	<lastBuildDate>Wed, 24 Aug 2011 10:06:02 +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>Solving Tomcat OutOfMemoryError: Heap space and PermGen space</title>
		<link>http://www.zulutown.com/blog/2009/03/12/solving-tomcat-outofmemoryerror-heap-space-and-permgen-space/</link>
		<comments>http://www.zulutown.com/blog/2009/03/12/solving-tomcat-outofmemoryerror-heap-space-and-permgen-space/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 20:44:04 +0000</pubDate>
		<dc:creator>Zulutown Webmaster</dc:creator>
				<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[heap]]></category>
		<category><![CDATA[java options]]></category>
		<category><![CDATA[jvmmx]]></category>
		<category><![CDATA[jvmoptions]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[maximum memory pool]]></category>
		<category><![CDATA[maxpermsize]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[outofmemoryerror]]></category>
		<category><![CDATA[permgen tomcat]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[tomcat6]]></category>
		<category><![CDATA[tomcat6w]]></category>

		<guid isPermaLink="false">http://www.zulutown.com/blog/?p=95</guid>
		<description><![CDATA[It&#8217;s quite common to run In memory problems when running some big Java EE application on a Tomcat server. Some of the most commmon errors are like the following ones. This is about a full Heap space: SEVERE: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError: Java heap space This other is about the PermGen space [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite common to run In <em>memory problems</em> when running some big Java EE application on a Tomcat server.<br />
Some of the most commmon errors are like the following ones.</p>
<p>This is about a full <em>Heap space</em>:</p>
<pre>SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.OutOfMemoryError: Java heap space</pre>
<p>This other is about the <em>PermGen space</em> that&#8217;s a memory area, where compiled classes (and <code>JSPs</code>) are kept, and this error might happen often if the running web application have many .java and .jsp.</p>
<pre>MemoryError: PermGen space
java.lang.OutOfMemoryError: PermGen space</pre>
<p>To increase the memory available to Tomcat, about <em>heap</em> and <em>permgen</em> the correct options are the following ones.</p>
<p>This sets the max <em>heap</em> available to Tomcat at 1Gb of memory:</p>
<pre>--JvmMx 1024</pre>
<p>This sets the max <em>permgen</em> available to Tomcat at 256Mb of memory:</p>
<pre>-XX:MaxPermSize=256m</pre>
<p>To change the Tomcat memory settings (when Tomcat is installed on Windows as <em>system service</em>), it&#8217;s required to use the command-line tool <code>tomcat6</code>. The next command changes the memory settings for the Tomcat service named <em>Tomcat6</em></p>
<pre>tomcat6 //US//Tomcat6 --JvmMx 1024 ++JvmOptions="-XX:MaxPermSize=256m"</pre>
<p>The label <code>//US//Tomcat6</code> has the meaning of <em>U</em>pdating <em>S</em>erver parameters for the service named <em>Tomcat6</em>.<br />
Obviously this command should be executed from the directory <code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin</code> or from wherever is the <code>bin</code> directory of your Tomcat installation. Or to make things simple, that directoy should be added to your <code>PATH</code> environment variable.</p>
<p>It&#8217;s even possible to update memory settings from a GUI frontend, or to view what happened after running the command line tool. Running the following command:</p>
<pre>tomcat6w //ES//Tomcat6</pre>
<p>a window will open showing all the parameters about the windows service <em>Tomcat6</em>.</p>
<p>It&#8217;s possible to see in this image that, after running the previous command, for setting higher memory limits, in the sections <strong>Maximum memory pool</strong> and at the end of the <strong>Java Options</strong> the new memory limits are set.</p>
<div id="attachment_96" class="wp-caption alignnone" style="width: 426px"><img class="size-full wp-image-96" title="Tomcat Memory Settings on Windows" src="http://www.zulutown.com/blog/wp-content/uploads/2009/03/configuration.png" alt="Tomcat Memory Settings on Windows" width="416" height="403" /><p class="wp-caption-text">Tomcat Memory Settings on Windows</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.zulutown.com/blog/2009/03/12/solving-tomcat-outofmemoryerror-heap-space-and-permgen-space/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

