ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject RE: Subant calls utilizing Ivy leak memory
Date Mon, 13 Aug 2007 13:18:10 GMT
Two possible approaches are:
- Use the loaderRef argument.
- Use some properties to skip the typedef when not already done.

Gilles

> -----Original Message-----
> From: jgunz [mailto:slobby@twcny.rr.com]
> Sent: lundi 13 août 2007 15:11
> To: ivy-user@incubator.apache.org
> Subject: Re: Subant calls utilizing Ivy leak memory
> 
> 
> I've had this problem for awhile and have done various things to minimize
> the
> impact on my project (eg. increased MaxPermSize) but the problem is still
> there and resurfaces every so often as we add more memory intensive tasks.
> 
> I believe the core of the problem is not the taskdef but the reconfiguring
> of Ivy. I haven't had a chance to dig into the code and I'm completely
> unfamiliar with Ant/Ivy's memory management. If you look at my example
> project and set the maxpermsize to 32mb, it fails very quickly. If you
> then
> simply comment out the <ivy:resolve/> call in the subproject, the failure
> does not occur.
> 
> Gilles,
> You mentioned you made sure all subants were using the same classloader
> and
> configured Ivy only once -- how did you ensure this?
> 
> 
> 
> Gilles Scokart wrote:
> >
> > I also had similar problem.
> >
> > In my case the origin was that I reloaded the ivy task every time.  I
> > fixed the problem by making sure that all subants where reusing the
> > same class loader and that I configured ivy only once.
> >
> > Gilles
> >
> > 2007/8/11, Jeffrey Blattman <jeffrey.blattman@gmail.com>:
> >> we had the same problem. however, my conclusion was that using Ivy was
> >> not the root cause but rather the straw that broke the camel's back.
> the
> >> research i did showed the using the "ant" and "antcall" targets are
> >> memory hungry and are at the root cause. i assume when you say "iterate
> >> over a series of subprojects" you are using the "ant" task.
> >>
> >> you can work around this by setting the MaxPermSize to some larger
> >> value. you can set this in your environment by doing:
> >>
> >> $ export ANT_OPTS="$ANT_OPTS -Xmx... -XX:MaxPermSize=..."
> >>
> >> where ... are some values you'll need to play with.
> >>
> >>
> >> jgunz wrote:
> >> > I'm getting "java.lang.OutOfMemoryError: PermGen space" errors when
> >> using
> >> > subant calls to iterate over a series of sub-projects which utilize
> >> Ivy. It
> >> > seems each call has to re-parse the ivysettings.xml file and
> >> continually
> >> > eats up memory.
> >> >
> >> > I've mocked up a simple example project that illustrates the problem.
> >> Ignore
> >> > the Groovy usage; I just did that to loop over the same sub-project
> >> multiple
> >> > times to simulate the effect of having numerous sub-projects.
> >> >
> >> > I recommend reducing Ant's maximum memory size so that you see the
> >> problem
> >> > faster by setting ANT_OPTS=-XX:MaxPermSize=32m
> >> >
> >> > The following project should run out of the box and generate an
> >> > OutOfMemoryError.
> >> > http://www.nabble.com/file/p12097331/ivySubantFailure.zip
> >> > ivySubantFailure.zip
> >> >
> >> >
> >>
> >
> >
> > --
> > Gilles SCOKART
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/Subant-calls-
> utilizing-Ivy-leak-memory-tf4250538.html#a12125931
> Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message