On 12 May 2012, at 12:05, Mark Struberg wrote: > It could also be a proxy problem of course. How is guice doing proxies?
Maven currently uses guice-no_aop http://code.google.com/p/google-guice/wiki/OptionalAOP so any proxies would use the standard JVM proxy mechanism. That said, I wouldn't expect many proxies to be generated with Maven - they're typically only used when there are circular references between constructors. > Proxies are also loaded via the ClassLoader and consume perm gen space. > > LieGrue, > strub > > ----- Original Message ----- >> From: Stuart McCulloch <[email protected]> >> To: Maven Users List <[email protected]> >> Cc: >> Sent: Saturday, May 12, 2012 11:36 AM >> Subject: Re: Memory Leak? >> >> On 12 May 2012, at 07:32, Hilco Wijbenga wrote: >> >>> On 11 May 2012 22:47, Anders Hammar <[email protected]> wrote: >>>> This is not uncommon for large multi-module builds. You need to >>>> increase the memory available for Maven, such as the heap depending on >>>> the error you're getting. >>>> Do this by setting the MAVEN_OPTS env variable. >>> >>> I know, it is already getting 2GB. I can't set it any higher (Maven >>> refuses to even start then). >> >> You might be running out of PermGen space - this is a separate heap in the >> HotSpot JVM used for classes, etc. Normally the default PermGen limit is ok, >> but >> can become an issue when running large apps or doing lots of code generation >> / >> compilation. The other thing is that bumping the main heap size doesn't >> change the default PermGen limit - instead you need to use something like: >> >> -XX:MaxPermSize=256m >> >> https://cwiki.apache.org/MAVEN/outofmemoryerror.html >> >>>> My experience is that this is mainly due to the plugins being used in >>>> the build, not Maven core. Are you using Maven 3? Maven 3 core has a >>>> smaller memory footprint than Maven 2. >>> >>> Maven 3.0.3. Should Maven not simply release plugins (and the memory >>> they use) between module builds? >> >> IIRC the Maven plugin manager should release mojos after each execution - of >> course this depends on the plugin not having a memory leak involving static >> members, which can keep memory around until the classloader is unloaded >> (which >> can take longer depending on other references). Also if you're hitting the >> PermGen limit then it's more about the amount of classes and interned >> strings you're loading rather the amount of objects being created. >> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
