The Dreaded PermGen Error
Flannery, Sean
sean.flannery at jwt.com
Mon Nov 11 11:57:33 EST 2013
I do not run the IDP and am not an expert on that, but perhaps I can help
you with the java part of your question
1. Increasing your MaxPermGenSize will, yes, only delay the invietable
crash * if you have a class loader leak * but if you don't have a leak it
could very well fix your problem. Are you sure you have a leak? I doubt
Shibboleth has a native leak. Have you tried a higher value? Personally,
I would increase your -XX:MaxPermSize option and see if it fixes the issue.
2. If increasing your PermGenSize does not help and you really have a
class loader leaak- they are tricky to fix and the only real solution is
to find it in a dev environment and fix it, i.e. there isn't a good way
(that I know of) to be proactive about it.
This website details how to trouble shoot such problems if you feel you do
have a class loader leak:
http://frankkieviet.blogspot.ca/2006/10/classloader-leaks-dreaded-permgen-s
pace.html
From: Joshua Riffle <jriffle at apu.edu>
Reply-To: Shib Users <users at shibboleth.net>
Date: Monday, November 11, 2013 10:23 AM
To: users <users at shibboleth.net>
Subject: The Dreaded PermGen Error
We have been getting this error from time to time with our Shibboleth
Identity Provider in Tomcat 6 and before you reply to this thread...
1) Yes I know this is caused by a memory leak and can be 'mitigated' by
increasing the max permgen size:
https://wiki.shibboleth.net/confluence/display/SHIB2/IdPApacheTomcatPrepare
<https://wiki.shibboleth.net/confluence/display/SHIB2/IdPApacheTomcatPrepa
re>
2) Or better yet possibly resolved in Tomcat 7:
http://wiki.apache.org/tomcat/MemoryLeakProtection
<http://wiki.apache.org/tomcat/MemoryLeakProtection>
-- What I don't know and would LOVE input on is:
1) How do you detect or prevent the evil PermGen error beforehand? My
understanding is increasing the MaxPermGenSize is only delaying the
inevitable memory leak build up.
2) Better yet: Best practices? What have you already done in your
architecture to avoid or defeat this kind of issue?
Joshua RiffleSoftware Engineer
Azusa Pacific University
More information about the users
mailing list