Tomcat – Java.Lang.OutOfMemoryError: PermGen Space

1 02 2015

If you see this, it means that your Tomcat server has not enough memory assigned for its Java Virtual Machine.

In a default configuration Tomcat even does not declare to require much momory. on my Windows 7 64-bit machine it was 86 Mb.

Using tips below you can adjust available memory as you need.

How to fix it [Linux]

To give Tomcat more memory navigate to ${tomcat-folder}\bin and create the setenv.sh file with params:

export JAVA_OPTS="-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m"

and restart Tomcat. setenv file will be automatically included in Tomcat startup script.

How to fix it [Windows]

To give Tomcat more memory navigate to ${tomcat-folder}\bin and create the setenv.bat file with params:

set JAVA_OPTS=-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m

and restart Tomcat. setenv file will be automatically included in Tomcat startup script.

Advertisements

Actions

Information

One response

17 02 2015
dineshramitc

Reblogged this on Dinesh Ram Kali..

Give Your feedback:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: