You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Shashidhar Rampally <sh...@gmail.com> on 2008/06/12 23:07:45 UTC

java.lang.OutOfMemoryError: PermGen space

Hey all,

I have deployed Alfresco (http://www.alfresco.com) on my
Apache2.0+modjk_Tomcat5.5.9 installation running on a Windows XP box.
Now, when I start Tomcat I get an OutOfMemoryError. I have searched a
lot and almost all posts say that I need to increase the heap space by
adding -Xms128m -Xmx512m to either JAVA_OPTS or CATALINA_OPTS
environment variable in the catalina.bat file. In my installation I do
not have a catalina.bat file at all! I do find catalina.policy and
catalina.properties files though in c:\Tomcat\conf directory. I tried
creating these variables in Windows Environment Variables but that did
not work.

Please advise!

Thanks,
Shashi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: java.lang.OutOfMemoryError: PermGen space

Posted by Shashidhar Rampally <sh...@gmail.com>.
Thanks for the quick reply Chuck! I found java5w.exe immediately after
I sent the email. Increasing the heap did not solve my issue. I had to
increase the PermSize by setting -XX:MaxPermSize=256m

Now I am getting some IO and RMI exceptions. However, they are all
related to Alfrsco.

Thanks again!
Thanks,
Shashi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: java.lang.OutOfMemoryError: PermGen space

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Shashidhar Rampally [mailto:shashi.rampally@gmail.com]
> Subject: java.lang.OutOfMemoryError: PermGen space
>
> I need to increase the heap space by adding -Xms128m -Xmx512m
> to either JAVA_OPTS or CATALINA_OPTS environment variable

That won't help if you're running out of PermGen space.

> In my installation I do not have a catalina.bat file at all!

For some inexplicable reason, the .exe distribution does not include the scripts, but the .zip one does.  Regardless, since you're running Tomcat as a service, you can adjust the heap sizes and other JVM parameters with the tomcat5w.exe program.

Here's a posting from earlier today about the same problem:

This is a common problem, so reading the FAQ:
   http://wiki.apache.org/tomcat/FAQ/Memory
is always a good idea, as would searching the archives:
   http://marc.info/?l=tomcat-user

You may have a memory leak in your applications that's leaving class references lying around, preventing them from being discarded via garbage collection.  Alternatively, if you really are running out of PermGen space, you'll have to increase it, which of course takes away from the real memory available for the rest of the heap.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org