<?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>java.lang.OutOfMemoryError: PermGen space Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/java-lang-outofmemoryerror-permgen-space/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/java-lang-outofmemoryerror-permgen-space/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:50:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 03 Sep 2015 06:32:06 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[java.lang.OutOfMemoryError: PermGen space]]></category>
		<category><![CDATA[Jenkins Error]]></category>
		<category><![CDATA[Jenkins Issue]]></category>
		<category><![CDATA[jenkins java.lang.OutOfMemoryError: PermGen space]]></category>
		<category><![CDATA[jenkins space issue]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Resolve]]></category>
		<category><![CDATA[Solution]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/09/03/jenkins-java-lang-outofmemoryerror-permgen-space-issues/</guid>

					<description><![CDATA[<p>Solution 1 In Windows: Go to environment variable and add following variables export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221; export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221; export SONAR_RUNNER_OPTS=&#8221;-Xmx512m [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/">How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-3367 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo.png" alt="jenkins-java-lang-outofmemoryerror-permgen-space-issues" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/09/jenkins-java-lang-outofmemo-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><strong>Solution 1</strong></p>
<p>In Windows: Go to environment variable and add following variables</p>
<p>export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;<br />
export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221;<br />
export SONAR_RUNNER_OPTS=&#8221;-Xmx512m -XX:MaxPermSize=512m&#8221;</p>
<p>In Linux:<br />
In my ~/.bash_profile file, I have set the following 3 variables. Note there are other variables in this file as well i.e. JAVA_HOME, ANT_HOME, SONAR_HOME, SONAR_RUNNER_HOME, etc:</p>
<p>export JAVA_OPTS=&#8221;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;<br />
export GRADLE_OPTS=&#8221;-XX:MaxPermSize=512m&#8221;<br />
export SONAR_RUNNER_OPTS=&#8221;-Xmx512m -XX:MaxPermSize=512m&#8221;</p>
<p><strong>Solution 2</strong><br />
You can set the -Xmx or -XX:MaxPermSize in your Jenkins global configuration. To do this, navigate to Jenkins global configuration page (Manage Jenkins -&gt; Configure System)</p>
<p>Name &#8211; JAVA_OPTS<br />
Value &#8211; &#8220;-XX:MaxPermSize=512m -Xms512m -Xmx1024m&#8221;</p>
<p>You can set similarlity for maven, gradle, sonar as well under &#8220;Maven Project Configuration&#8221; or grade project configuration.</p>
<p>Name &#8211; GRADLE_OPTS<br />
Value &#8211; &#8220;-XX:MaxPermSize=512m&#8221;</p>
<p><strong>Solution 3</strong></p>
<p>They way you can modify this value depends on the distribution and depending on the slave type</p>
<p>Master</p>
<p>In RedHat, for example, you can do it under /etc/sysconfig/jenkins using the variable JENKINS_JAVA_OPTIONS&#8230; i.e JENKINS_JAVA_OPTIONS=&#8221;-XX:MaxPermSize=512m&#8221;.<br />
In Ubuntu, the Jenkins configuration file is under /etc/default/jenkins and the variable to configure is JAVA_ARGS &#8230; i.e JAVA_ARGS=&#8221;-XX:MaxPermSize=512m&#8221;.</p>
<p>Slave</p>
<p>Sometimes slave machines will require permgen to be increased. Depending on the type of slave that is configured will require a different method for setting any java argument.</p>
<p>With SSH Slaves, the java process is started using an SSH command, so the &#8220;-XX:MaxPermSize=512m&#8221; can be set in the JVM Options in the Node configuration page.<br />
With JNLP Slaves launching as a service on linux, you can add the VM arguments to the startup scripts (usually in /etc/sysconfig/jenkins or /etc/default/jenkins as part of the JAVA_ARGS variable)<br />
With JNLP Slaves launching as a service on Windows requires modifications to be made on the jenkins.xml file which is located on slave machine in the JENKINS_HOME directory.</p>
<p><strong>Reference</strong><br />
<a href="http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space" target="_blank" rel="noopener">http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space</a><br />
<a href="https://wiki.jenkins-ci.org/display/JENKINS/Builds+failing+with+OutOfMemoryErrors" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Builds+failing+with+OutOfMemoryErrors</a><br />
<a href="https://cloudbees.zendesk.com/hc/en-us/articles/204264000-Why-do-I-receive-java-lang-OutOfMemoryError-PermGen-space" target="_blank" rel="noopener">https://cloudbees.zendesk.com/hc/en-us/articles/204264000-Why-do-I-receive-java-lang-OutOfMemoryError-PermGen-space</a><br />
<a href="http://stackoverflow.com/questions/14762162/how-do-i-give-jenkins-more-heap-space-when-its-running-as-a-daemon-on-ubuntu" target="_blank" rel="noopener">http://stackoverflow.com/questions/14762162/how-do-i-give-jenkins-more-heap-space-when-its-running-as-a-daemon-on-ubuntu</a><br />
<a href="http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space" target="_blank" rel="noopener">http://stackoverflow.com/questions/18000841/jenkins-java-lang-outofmemoryerror-permgen-space</a><br />
<a href="http://javarevisited.blogspot.nl/2011/09/javalangoutofmemoryerror-permgen-space.html" target="_blank" rel="noopener">http://javarevisited.blogspot.nl/2011/09/javalangoutofmemoryerror-permgen-space.html</a><br />
<a href="https://plumbr.eu/outofmemoryerror/permgen-space" target="_blank" rel="noopener">https://plumbr.eu/outofmemoryerror/permgen-space</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/">How to Resolve jenkins java.lang.outofmemoryerror permgen space issues?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-java-lang-outofmemoryerror-permgen-space-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
