On 3/26/2010 9:10 AM, Andrew Hughes wrote: > After some helpful advice I've got a fix (thanks brett). The least I could > do is share it..... > > Summary: > > - The default 32Mb MaxPermGen isn't enough for complex maven builds. Even > if your codebase is small, your maven plugins might exceed this threshold > (in particular the reporting plugins). > - Increasing this to 256Mb should be ample. > - Increasing to 256Mb is easy with the environment parameter > *"MAVEN_OPTS=-Xmx1024m > -XX:MaxPermSize=256m"* > - Diagnose your MaxPermSize at runtime with "*mvn system:help*" and > check out your MAVEN_OPTS. > > My setup was setting two MAVEN_OPTS, this was easy to detect once I saw the > output from "*mvn system:help*". > did you mean to type mvn help:system
mvn system:help fails (mvn 2.2.1) for me. -Marshall > Cheers :) > > > On Fri, Mar 26, 2010 at 11:02 AM, Andrew Hughes <[email protected]> wrote: > > >> Hi All, >> >> Recently I turned on several plugins only to find Java's annoying >> "OutOfMemory PermGen space" error. Since this problem exists at the JVM >> level I am finding it very difficult to diagnose the problem and where it >> exists in my maven configuration. >> >> Setting your MAVEN_OPTS environment parameter, so that >> MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" fixes most people's permgen >> related problems - but it does not in my case. Personally speaking, 256m of >> PermGen is HUGE! I have even run this with a MASSIVE 512m and it still >> fails. This leads me to believe that the problem lies elsewhere, and that >> there *might* be >1 JVM being used. >> >> Recommendations have lead me to investigate "forking" the execution of the >> compiler. This is also a convoluted and relatively undocumented config which >> makes the job that much harder. I'm yet to get a working forking >> configuration. Further more there's little doco on Forking other plugins >> (like reporting/site plugins). So I'm not actually doing any non-default >> forking with any plugins - perhaps I should be? >> >> Conclusion: >> I've no way of determining exactly what, why or which plugin is using up >> all my PermGen space. It's also very difficult for me to configure forking >> (aka running the plugin in a different JVM to maven) plugins. Especially >> when I don't know what plugin is causing the problem to begin with. >> >> If anyone has any advice for diagnosing this I would very much appreciate >> your help. >> >> --AH >> >> p.s. >> >> mvn clean install == success! >> mvn clean install site == fail! >> >> but >> >> mvn clean install; mvn site == success! >> >> >> >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
