[65cat] [j2ee] java.lang.OutOfMemoryError: PermGen space

View: New views
4 Messages — Rating Filter:   Alert me  

[65cat] [j2ee] java.lang.OutOfMemoryError: PermGen space

by Donald Kittle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I frequently encounter an "java.lang.OutOfMemoryError: PermGen space"
exception when in heavy development mode with lots of changes to files
and redeployment of a web or J2EE application (without restarting a
server).  I had this problem a LOT more frequently with Glassfish 1 than
with 2, but it still rears it's ugly head from time to time.

I believe this is a long standing issue with many application servers.

I'm wondering, though, if it should be the responsibility of the IDE to
work around this problem, perhaps 'guessing' or 'deducing' when the
problem is likely to occur.

I'd like to file an issue for this, but I'm also looking to the dev team
for some feedback on this first.

Thanks, Don


Re: [65cat] [j2ee] java.lang.OutOfMemoryError: PermGen space

by Jacek Laskowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Jul 22, 2008 at 3:41 PM, Donald Kittle <donald@...> wrote:

> I'm wondering, though, if it should be the responsibility of the IDE to work
> around this problem, perhaps 'guessing' or 'deducing' when the problem is
> likely to occur.

I don't think there's much application servers can do. If they could
it'd already be fixed I guess. I'm a commiter for Apache Geronimo and
it's reported a couple of times as redeployment puts a lot of pressure
on PermGen. NetBeans is not an exception. I run it with the following
command line options so I don't run into it very frequently if at all:

--jdkhome c:/apps/java6 -J-Xms128m -J-Xmx512m -J-XX:PermSize=32m
-J-XX:MaxPermSize=200m -J-ea -J-Dfile.encoding=utf-8
-J-Duser.language=en

Use them to tune your java development environment.

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl

Re: [65cat] [j2ee] java.lang.OutOfMemoryError: PermGen space

by Allan Davis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was getting this error alot till I bumped the space settings for
netbeans.  It is in the config file under etc in the netbeans install
directory.

Hope this helps
Alley

Donald Kittle wrote:

> I frequently encounter an "java.lang.OutOfMemoryError: PermGen space"
> exception when in heavy development mode with lots of changes to files
> and redeployment of a web or J2EE application (without restarting a
> server).  I had this problem a LOT more frequently with Glassfish 1
> than with 2, but it still rears it's ugly head from time to time.
>
> I believe this is a long standing issue with many application servers.
>
> I'm wondering, though, if it should be the responsibility of the IDE
> to work around this problem, perhaps 'guessing' or 'deducing' when the
> problem is likely to occur.
>
> I'd like to file an issue for this, but I'm also looking to the dev
> team for some feedback on this first.
>
> Thanks, Don
>
>

Re: [65cat] [j2ee] java.lang.OutOfMemoryError: PermGen space

by Jacek Laskowski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 23, 2008 at 2:00 AM, Allan Davis
<alley@...> wrote:
> I was getting this error alot till I bumped the space settings for netbeans.
>  It is in the config file under etc in the netbeans install directory.

The main difference between specyfing the settings in the config file
and on the command line is that you have to be very careful not to
wipe it out the next NetBeans upgrade, which is inevitable during
NetCAT.

Jacek

--
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
LightInTheBox - Buy quality products at wholesale price