You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephen Winnall <st...@winnall.ch> on 2007/07/20 20:54:58 UTC

PermGen space problem with Cocoon on Tomcat

I'm trying to deploy my Cocoon application in Tomcat and am getting  
the following error:

	java.lang.OutOfMemoryError: PermGen space

Wisdom on the net has it that this happens as a result of large  
memory leaks: if classes used in a servlet are referenced from  
outside the servlet, the garbage collector cannot recycle them when  
the application is undeployed; redeploying the application results in  
the classes being loaded a further time, and so on until memory runs  
out. I have looked in the Cocoon mailing lists for other occurrences  
of this problem, but I've found nothing, so I assume the problem is  
in one of the classes I wrote to extend my application.

Does anyone have experience with tracking down this sort of problem  
in Cocoon apps?

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by Huib Verweij <hv...@be-value.nl>.
Hi Stephen,

I had the same problem, also after redeploying applications in Tomcat a 
few times, both on Red Hat and Windows. Increasing PermGen space just 
postponed the problem. The problem went away by using another JVM. I 
picked BEA's JRockit for speed. It had some other problems though, but 
now it runs fine.

Best regards,

Huib.


Stephen Winnall schreef:
> Hi Robin
>
> Thanks. I agree that it could be that. However, after a fresh restart 
> everything runs fine, so there appears to be basically enough space 
> available. The problem only occurs after a number of redeployments, so 
> I'm assuming a memory leak at the moment. But I'll gladly come back to 
> your suggestion if my assumption is wrong.
>
>>>>>
>>>>>> I'm trying to deploy my Cocoon application in Tomcat and am
>>>>>> getting the following error:
>>>>>>
>>>>>>     java.lang.OutOfMemoryError: PermGen space
>>>>>>
>>>>>> Wisdom on the net has it that this happens as a result of large
>>>>>> memory leaks: if classes used in a servlet are referenced from
>>>>>> outside the servlet, the garbage collector cannot recycle them
>>>>>> when the application is undeployed; redeploying the application
>>>>>> results in the classes being loaded a further time, and so on
>>>>>> until memory runs out. I have looked in the Cocoon mailing lists
>>>>>> for other occurrences of this problem, but I've found nothing,
>>>>>> so I assume the problem is in one of the classes I wrote to
>>>>>> extend my application.
>>>>>>
>>>>>> Does anyone have experience with tracking down this sort of
>>>>>> problem in Cocoon apps?


Re: PermGen space problem with Cocoon on Tomcat

Posted by Stephen Winnall <st...@winnall.ch>.
Hi Robin

Thanks. I agree that it could be that. However, after a fresh restart  
everything runs fine, so there appears to be basically enough space  
available. The problem only occurs after a number of redeployments,  
so I'm assuming a memory leak at the moment. But I'll gladly come  
back to your suggestion if my assumption is wrong.

Steve

On 22 Jul 2007, at 01:45, Robin Rigby wrote:

> I had a similar thing a month or two ago.
>
> I spent a lot of time looking in vain for a classloader leak.  It  
> turned out
> Cocoon needs more memory (on my system) than the Tomcat default.
>
> Have you tried making more memory available to Tomcat?  I added memory
> options to the script that launches Tomcat.  Something like
>
>      -Xms256m \
>      -Xmx512m \
>      -XX:PermSize=64m \
>      -XX:MaxPermSize=256m \
> 	etc
>
> Problem gone.  I don't think there is a classloader leak (on my  
> machine,
> anyway).
>
> I wrote a little script to log the permgen statistics as Tomcat  
> starts up.
>
> hth
>
> Robin
>
>
> -----Original Message-----
> From: Stephen Winnall [mailto:steve@winnall.ch]
> Sent: 21 July 2007 23:55
> To: users@cocoon.apache.org
> Subject: Re: PermGen space problem with Cocoon on Tomcat
>
> I don't know how much memory the machine has. I have read various
> articles on the net which have suggested increasing the memory
> available to Tomcat's JVM (part of what Christoph suggested), but the
> consensus seems to be that this merely defers the problem rather than
> solving it. Memory leaks chew up memory until there is none left:
> it's just a matter of how long it takes!
>
> At the moment I'm concentrating on the JDBC hypothesis. If the
> problem comes round again after that, there are two further
> possibilities:
>
> 1) references (pointers) from outside the application to classes
> within the application (non-JDBC)
> 2) memory size
>
> I'm planning on taking them in that order. Although my instinct says
> "fix the basic problem", if I only have to restart Tomcat say every
> two weeks I may go with that if the solution proves too elusive.
>
> Steve
>
> On 21 Jul 2007, at 16:18, Jonathan Hipkiss wrote:
>
>> Do you know how much memory the machine has?  We were getting this
>> on a Solaris 10 server with 1gb of Ram which we doubled and the
>> problem went away.
>>
>> Jonathan
>>
>> Stephen Winnall wrote:
>>> Hi Antonio, Christoph
>>>
>>> I'm using Cocoon 2.1.9 on Tomcat 5.5.23 with Sun's Java 1.5.0_11-
>>> b03 on Linux 2.6.18-4-amd64 (not sure which distro: it's at my
>>> provider's site).
>>>
>>> Christoph's suggestions tally with things I've discovered on the
>>> net in the last couple of hours. I'll run them past my provider.
>>>
>>> Another possibility seems to be JDBC: if the jar file is under WEB-
>>> INF/lib the garbage collector cannot release resources held by the
>>> database. Guess where my postgresql.jar is...
>>>
>>> Part of my problem is that I develop under Mac OS X and just
>>> restart Tomcat when things go wrong in my development environment:
>>> deploying to a completely different platform is forcing me to be
>>> more rigorous.
>>>
>>> Steve
>>>
>>>
>>> On 20 Jul 2007, at 21:03, Antonio Gallardo wrote:
>>>
>>>> Hi Stephen, would you provide more info?
>>>>
>>>> Java version, cocoon version, tomcat version, OS, etc?
>>>>
>>>> Best Regards,
>>>>
>>>> Antonio Gallardo.
>>>>
>>>> Stephen Winnall escribió:
>>>>> I'm trying to deploy my Cocoon application in Tomcat and am
>>>>> getting the following error:
>>>>>
>>>>>     java.lang.OutOfMemoryError: PermGen space
>>>>>
>>>>> Wisdom on the net has it that this happens as a result of large
>>>>> memory leaks: if classes used in a servlet are referenced from
>>>>> outside the servlet, the garbage collector cannot recycle them
>>>>> when the application is undeployed; redeploying the application
>>>>> results in the classes being loaded a further time, and so on
>>>>> until memory runs out. I have looked in the Cocoon mailing lists
>>>>> for other occurrences of this problem, but I've found nothing,
>>>>> so I assume the problem is in one of the classes I wrote to
>>>>> extend my application.
>>>>>
>>>>> Does anyone have experience with tracking down this sort of
>>>>> problem in Cocoon apps?
>>>>>
>>>>> Steve
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------ 
>>>>> -
>>>>> --
>>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> -
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>>
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: PermGen space problem with Cocoon on Tomcat

Posted by Robin Rigby <ro...@gondolier.org.uk>.
I had a similar thing a month or two ago.

I spent a lot of time looking in vain for a classloader leak.  It turned out
Cocoon needs more memory (on my system) than the Tomcat default.

Have you tried making more memory available to Tomcat?  I added memory
options to the script that launches Tomcat.  Something like

     -Xms256m \
     -Xmx512m \
     -XX:PermSize=64m \
     -XX:MaxPermSize=256m \
	etc  

Problem gone.  I don't think there is a classloader leak (on my machine,
anyway).

I wrote a little script to log the permgen statistics as Tomcat starts up.  

hth
 
Robin
 

-----Original Message-----
From: Stephen Winnall [mailto:steve@winnall.ch] 
Sent: 21 July 2007 23:55
To: users@cocoon.apache.org
Subject: Re: PermGen space problem with Cocoon on Tomcat

I don't know how much memory the machine has. I have read various  
articles on the net which have suggested increasing the memory  
available to Tomcat's JVM (part of what Christoph suggested), but the  
consensus seems to be that this merely defers the problem rather than  
solving it. Memory leaks chew up memory until there is none left:  
it's just a matter of how long it takes!

At the moment I'm concentrating on the JDBC hypothesis. If the  
problem comes round again after that, there are two further  
possibilities:

1) references (pointers) from outside the application to classes  
within the application (non-JDBC)
2) memory size

I'm planning on taking them in that order. Although my instinct says  
"fix the basic problem", if I only have to restart Tomcat say every  
two weeks I may go with that if the solution proves too elusive.

Steve

On 21 Jul 2007, at 16:18, Jonathan Hipkiss wrote:

> Do you know how much memory the machine has?  We were getting this  
> on a Solaris 10 server with 1gb of Ram which we doubled and the  
> problem went away.
>
> Jonathan
>
> Stephen Winnall wrote:
>> Hi Antonio, Christoph
>>
>> I'm using Cocoon 2.1.9 on Tomcat 5.5.23 with Sun's Java 1.5.0_11- 
>> b03 on Linux 2.6.18-4-amd64 (not sure which distro: it's at my  
>> provider's site).
>>
>> Christoph's suggestions tally with things I've discovered on the  
>> net in the last couple of hours. I'll run them past my provider.
>>
>> Another possibility seems to be JDBC: if the jar file is under WEB- 
>> INF/lib the garbage collector cannot release resources held by the  
>> database. Guess where my postgresql.jar is...
>>
>> Part of my problem is that I develop under Mac OS X and just  
>> restart Tomcat when things go wrong in my development environment:  
>> deploying to a completely different platform is forcing me to be  
>> more rigorous.
>>
>> Steve
>>
>>
>> On 20 Jul 2007, at 21:03, Antonio Gallardo wrote:
>>
>>> Hi Stephen, would you provide more info?
>>>
>>> Java version, cocoon version, tomcat version, OS, etc?
>>>
>>> Best Regards,
>>>
>>> Antonio Gallardo.
>>>
>>> Stephen Winnall escribió:
>>>> I'm trying to deploy my Cocoon application in Tomcat and am  
>>>> getting the following error:
>>>>
>>>>     java.lang.OutOfMemoryError: PermGen space
>>>>
>>>> Wisdom on the net has it that this happens as a result of large  
>>>> memory leaks: if classes used in a servlet are referenced from  
>>>> outside the servlet, the garbage collector cannot recycle them  
>>>> when the application is undeployed; redeploying the application  
>>>> results in the classes being loaded a further time, and so on  
>>>> until memory runs out. I have looked in the Cocoon mailing lists  
>>>> for other occurrences of this problem, but I've found nothing,  
>>>> so I assume the problem is in one of the classes I wrote to  
>>>> extend my application.
>>>>
>>>> Does anyone have experience with tracking down this sort of  
>>>> problem in Cocoon apps?
>>>>
>>>> Steve
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by Stephen Winnall <st...@winnall.ch>.
I don't know how much memory the machine has. I have read various  
articles on the net which have suggested increasing the memory  
available to Tomcat's JVM (part of what Christoph suggested), but the  
consensus seems to be that this merely defers the problem rather than  
solving it. Memory leaks chew up memory until there is none left:  
it's just a matter of how long it takes!

At the moment I'm concentrating on the JDBC hypothesis. If the  
problem comes round again after that, there are two further  
possibilities:

1) references (pointers) from outside the application to classes  
within the application (non-JDBC)
2) memory size

I'm planning on taking them in that order. Although my instinct says  
"fix the basic problem", if I only have to restart Tomcat say every  
two weeks I may go with that if the solution proves too elusive.

Steve

On 21 Jul 2007, at 16:18, Jonathan Hipkiss wrote:

> Do you know how much memory the machine has?  We were getting this  
> on a Solaris 10 server with 1gb of Ram which we doubled and the  
> problem went away.
>
> Jonathan
>
> Stephen Winnall wrote:
>> Hi Antonio, Christoph
>>
>> I'm using Cocoon 2.1.9 on Tomcat 5.5.23 with Sun's Java 1.5.0_11- 
>> b03 on Linux 2.6.18-4-amd64 (not sure which distro: it's at my  
>> provider's site).
>>
>> Christoph's suggestions tally with things I've discovered on the  
>> net in the last couple of hours. I'll run them past my provider.
>>
>> Another possibility seems to be JDBC: if the jar file is under WEB- 
>> INF/lib the garbage collector cannot release resources held by the  
>> database. Guess where my postgresql.jar is...
>>
>> Part of my problem is that I develop under Mac OS X and just  
>> restart Tomcat when things go wrong in my development environment:  
>> deploying to a completely different platform is forcing me to be  
>> more rigorous.
>>
>> Steve
>>
>>
>> On 20 Jul 2007, at 21:03, Antonio Gallardo wrote:
>>
>>> Hi Stephen, would you provide more info?
>>>
>>> Java version, cocoon version, tomcat version, OS, etc?
>>>
>>> Best Regards,
>>>
>>> Antonio Gallardo.
>>>
>>> Stephen Winnall escribió:
>>>> I'm trying to deploy my Cocoon application in Tomcat and am  
>>>> getting the following error:
>>>>
>>>>     java.lang.OutOfMemoryError: PermGen space
>>>>
>>>> Wisdom on the net has it that this happens as a result of large  
>>>> memory leaks: if classes used in a servlet are referenced from  
>>>> outside the servlet, the garbage collector cannot recycle them  
>>>> when the application is undeployed; redeploying the application  
>>>> results in the classes being loaded a further time, and so on  
>>>> until memory runs out. I have looked in the Cocoon mailing lists  
>>>> for other occurrences of this problem, but I've found nothing,  
>>>> so I assume the problem is in one of the classes I wrote to  
>>>> extend my application.
>>>>
>>>> Does anyone have experience with tracking down this sort of  
>>>> problem in Cocoon apps?
>>>>
>>>> Steve
>>>>
>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by Jonathan Hipkiss <jo...@hipkiss.org>.
Do you know how much memory the machine has?  We were getting this on a 
Solaris 10 server with 1gb of Ram which we doubled and the problem went 
away.

Jonathan

Stephen Winnall wrote:
> Hi Antonio, Christoph
>
> I'm using Cocoon 2.1.9 on Tomcat 5.5.23 with Sun's Java 1.5.0_11-b03 
> on Linux 2.6.18-4-amd64 (not sure which distro: it's at my provider's 
> site).
>
> Christoph's suggestions tally with things I've discovered on the net 
> in the last couple of hours. I'll run them past my provider.
>
> Another possibility seems to be JDBC: if the jar file is under 
> WEB-INF/lib the garbage collector cannot release resources held by the 
> database. Guess where my postgresql.jar is...
>
> Part of my problem is that I develop under Mac OS X and just restart 
> Tomcat when things go wrong in my development environment: deploying 
> to a completely different platform is forcing me to be more rigorous.
>
> Steve
>
>
> On 20 Jul 2007, at 21:03, Antonio Gallardo wrote:
>
>> Hi Stephen, would you provide more info?
>>
>> Java version, cocoon version, tomcat version, OS, etc?
>>
>> Best Regards,
>>
>> Antonio Gallardo.
>>
>> Stephen Winnall escribió:
>>> I'm trying to deploy my Cocoon application in Tomcat and am getting 
>>> the following error:
>>>
>>>     java.lang.OutOfMemoryError: PermGen space
>>>
>>> Wisdom on the net has it that this happens as a result of large 
>>> memory leaks: if classes used in a servlet are referenced from 
>>> outside the servlet, the garbage collector cannot recycle them when 
>>> the application is undeployed; redeploying the application results 
>>> in the classes being loaded a further time, and so on until memory 
>>> runs out. I have looked in the Cocoon mailing lists for other 
>>> occurrences of this problem, but I've found nothing, so I assume the 
>>> problem is in one of the classes I wrote to extend my application.
>>>
>>> Does anyone have experience with tracking down this sort of problem 
>>> in Cocoon apps?
>>>
>>> Steve
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by Stephen Winnall <st...@winnall.ch>.
Hi Antonio, Christoph

I'm using Cocoon 2.1.9 on Tomcat 5.5.23 with Sun's Java 1.5.0_11-b03  
on Linux 2.6.18-4-amd64 (not sure which distro: it's at my provider's  
site).

Christoph's suggestions tally with things I've discovered on the net  
in the last couple of hours. I'll run them past my provider.

Another possibility seems to be JDBC: if the jar file is under WEB- 
INF/lib the garbage collector cannot release resources held by the  
database. Guess where my postgresql.jar is...

Part of my problem is that I develop under Mac OS X and just restart  
Tomcat when things go wrong in my development environment: deploying  
to a completely different platform is forcing me to be more rigorous.

Steve


On 20 Jul 2007, at 21:03, Antonio Gallardo wrote:

> Hi Stephen, would you provide more info?
>
> Java version, cocoon version, tomcat version, OS, etc?
>
> Best Regards,
>
> Antonio Gallardo.
>
> Stephen Winnall escribió:
>> I'm trying to deploy my Cocoon application in Tomcat and am  
>> getting the following error:
>>
>>     java.lang.OutOfMemoryError: PermGen space
>>
>> Wisdom on the net has it that this happens as a result of large  
>> memory leaks: if classes used in a servlet are referenced from  
>> outside the servlet, the garbage collector cannot recycle them  
>> when the application is undeployed; redeploying the application  
>> results in the classes being loaded a further time, and so on  
>> until memory runs out. I have looked in the Cocoon mailing lists  
>> for other occurrences of this problem, but I've found nothing, so  
>> I assume the problem is in one of the classes I wrote to extend my  
>> application.
>>
>> Does anyone have experience with tracking down this sort of  
>> problem in Cocoon apps?
>>
>> Steve
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Stephen, would you provide more info?

Java version, cocoon version, tomcat version, OS, etc?

Best Regards,

Antonio Gallardo.

Stephen Winnall escribió:
> I'm trying to deploy my Cocoon application in Tomcat and am getting 
> the following error:
>
>     java.lang.OutOfMemoryError: PermGen space
>
> Wisdom on the net has it that this happens as a result of large memory 
> leaks: if classes used in a servlet are referenced from outside the 
> servlet, the garbage collector cannot recycle them when the 
> application is undeployed; redeploying the application results in the 
> classes being loaded a further time, and so on until memory runs out. 
> I have looked in the Cocoon mailing lists for other occurrences of 
> this problem, but I've found nothing, so I assume the problem is in 
> one of the classes I wrote to extend my application.
>
> Does anyone have experience with tracking down this sort of problem in 
> Cocoon apps?
>
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PermGen space problem with Cocoon on Tomcat

Posted by "Christoph Gaffga (triplemind.com)" <cg...@triplemind.com>.
hi,

permanent must nor be permanent ;-)

you can also configure the permanent generation of the vm's heap:
e.g. add to your CATALINA_OPTS:

-XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled -XX:PermSize=256m -XX:MaxPermSize=512m

Especially redeploying often, dynamic class generation, stubs etc. can
produce a lot of classes, that a typically stored in the permanent
generation of the heap.

see http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

yours,
Christoph


Stephen Winnall wrote:
> I'm trying to deploy my Cocoon application in Tomcat and am getting the
> following error:
> 
>     java.lang.OutOfMemoryError: PermGen space
> 
> Wisdom on the net has it that this happens as a result of large memory
> leaks: if classes used in a servlet are referenced from outside the
> servlet, the garbage collector cannot recycle them when the application
> is undeployed; redeploying the application results in the classes being
> loaded a further time, and so on until memory runs out. I have looked in
> the Cocoon mailing lists for other occurrences of this problem, but I've
> found nothing, so I assume the problem is in one of the classes I wrote
> to extend my application.
> 
> Does anyone have experience with tracking down this sort of problem in
> Cocoon apps?
> 
> Steve
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

-- 
Triplemind Internet OHG
Berlinerstr. 2
DE-63065 Offenbach
Germany

http://www.triplemind.com
Mail info@triplemind.com
Tel  +49 69 82367670
Fax  +49 69 82367654

Unternehmensdaten: Triplemind OHG
Geschaeftsfuehrung: Christoph Gaffga, Mathias Ziegler
Bankverbindung: Postbank Frankfurt,  BLZ: 50010060, Kto: 563581608,
IBAN: DE28 5001 0060 0563 5816 08, BIC: PBNKDEFF
Eingetragen im HR Offenbach am Main 40202, USt-IdNr.: DE210080643

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org