You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Hoffer <DH...@xrite.com> on 2006/05/11 22:35:23 UTC

[m2.0.4] OutOfMemoryError

For some of my projects that use a lot of memory when running unit tests
I set MAVEN_OPTS to -Xmx1024m to get all the tests to not throw
OutOfMemoryErrors.  

I now have a maven project that has a dependency on the prior component
but I do get an OutOfMemoryError when I run the unit tests.  I have
tried to set -Xmx to larger values with no success, as it always fails.
The poms are all but identical, why should one fail?

Also, in the process viewer I see that when running the tests there are
two java processes.  One reports using about 90MB and the other about
64MB.  Why are there two?  These numbers are way lower than the max java
heap size specified.

Any ideas?

-dh

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


Re: [m2.0.4] OutOfMemoryError

Posted by Brett Porter <br...@gmail.com>.
FYI, the upcoming 2.2 release of surefire will reduce the memory used
by allowing the test cases to be garbage collected after they've run
instead of at the end. It also enables assertions by default, whether
you are forking or not, by setting the flag on the classloader running
the tests.

- Brett

On 5/12/06, Daniel Kulp <da...@kulp.com> wrote:
>
> You can use the "argLine" configuration option for surefire plugin to add
> JVM args.   Things like "-ea" to enable the assertions that you should be
> testing are also good things to put on that line.
>
> Dan
>
>
> On Thursday 11 May 2006 16:40, Kris Nuttycombe wrote:
> > I have a related question to this: Is it possible to specify the memory
> > footprint except using the MAVEN_OPTS environment variable? It would be
> > useful to have this as an option for the surefire plugin, at least if
> > the tests are running in a separate JVM.
> >
> > Kris
> >
> > Dave Hoffer wrote:
> > >For some of my projects that use a lot of memory when running unit
> > > tests I set MAVEN_OPTS to -Xmx1024m to get all the tests to not throw
> > > OutOfMemoryErrors.
> > >
> > >I now have a maven project that has a dependency on the prior
> > > component but I do get an OutOfMemoryError when I run the unit tests.
> > >  I have tried to set -Xmx to larger values with no success, as it
> > > always fails. The poms are all but identical, why should one fail?
> > >
> > >Also, in the process viewer I see that when running the tests there
> > > are two java processes.  One reports using about 90MB and the other
> > > about 64MB.  Why are there two?  These numbers are way lower than the
> > > max java heap size specified.
> > >
> > >Any ideas?
> > >
> > >-dh
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > >For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
> --
> J. Daniel Kulp
> dan@kulp.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: [m2.0.4] OutOfMemoryError

Posted by Daniel Kulp <da...@kulp.com>.
You can use the "argLine" configuration option for surefire plugin to add 
JVM args.   Things like "-ea" to enable the assertions that you should be 
testing are also good things to put on that line.

Dan


On Thursday 11 May 2006 16:40, Kris Nuttycombe wrote:
> I have a related question to this: Is it possible to specify the memory
> footprint except using the MAVEN_OPTS environment variable? It would be
> useful to have this as an option for the surefire plugin, at least if
> the tests are running in a separate JVM.
>
> Kris
>
> Dave Hoffer wrote:
> >For some of my projects that use a lot of memory when running unit
> > tests I set MAVEN_OPTS to -Xmx1024m to get all the tests to not throw
> > OutOfMemoryErrors.
> >
> >I now have a maven project that has a dependency on the prior
> > component but I do get an OutOfMemoryError when I run the unit tests.
> >  I have tried to set -Xmx to larger values with no success, as it
> > always fails. The poms are all but identical, why should one fail?
> >
> >Also, in the process viewer I see that when running the tests there
> > are two java processes.  One reports using about 90MB and the other
> > about 64MB.  Why are there two?  These numbers are way lower than the
> > max java heap size specified.
> >
> >Any ideas?
> >
> >-dh
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
J. Daniel Kulp
dan@kulp.com

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


Re: [m2.0.4] OutOfMemoryError

Posted by Kris Nuttycombe <Kr...@noaa.gov>.
I have a related question to this: Is it possible to specify the memory 
footprint except using the MAVEN_OPTS environment variable? It would be 
useful to have this as an option for the surefire plugin, at least if 
the tests are running in a separate JVM.

Kris

Dave Hoffer wrote:

>For some of my projects that use a lot of memory when running unit tests
>I set MAVEN_OPTS to -Xmx1024m to get all the tests to not throw
>OutOfMemoryErrors.  
>
>I now have a maven project that has a dependency on the prior component
>but I do get an OutOfMemoryError when I run the unit tests.  I have
>tried to set -Xmx to larger values with no success, as it always fails.
>The poms are all but identical, why should one fail?
>
>Also, in the process viewer I see that when running the tests there are
>two java processes.  One reports using about 90MB and the other about
>64MB.  Why are there two?  These numbers are way lower than the max java
>heap size specified.
>
>Any ideas?
>
>-dh
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>  
>

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