ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Haile" <jha...@fastmail.fm>
Subject OutOfMemoryException on large build
Date Fri, 20 Feb 2004 22:18:18 GMT
We have a fairly long build process.  Currently our project consists of
many modules, each with their own build.xml file.  There is also a master
build.xml file that calls each module build.xml sequentially (in order of
module dependencies).

A typical module target in the master build.xml looks like:

<target name="event_mgmt" description="Event management" depends="sysmgr"
>
        <echo message="Building Event Management module" />
        <ant dir="${src.dir}/event_mgmt"
                target="${target}" inheritAll="false" />
</target>

The module build.xml files perform many tasks from compiling classes,
running xdoclet tasks, archiving ejb-jars and libs, JBoss SARs, signing
jars etc. etc.  A complete build process starting with a "clean" takes
around 6-7 minutes typically.  After adding a new module recently, I am
receiving an OutOfMemoryError.  However, it does not seem to be specific
to that module as other people have received it in the past and the OOME
occurs during different tasks if I play around with the build process.  

What I find very strange is that if I watch Ant's memory usage (using
system monitor or top) it constantly increases during the entire build. 
It typically starts around 150 MB and increases to around 330MB before
the OOME.  The OOME always occurs towards the later part of the build
process. Why would ant not be releasing memory through garbage collection
after each module is compiled?  When I watch the memory usage it is
always increasing, never decreasing as I would expect.  

My computer has 1 Gig of RAM and is an Intel P4 2+ Ghz Dell PC.

I have tried increasing the heap size and stack size using the Xmx and
Xss flags in ANT_OPTS to no avail.  Any help or ideas would be greatly
appreciated.

-Jeremy
-- 
  Jeremy Haile
  jhaile@fastmail.fm

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message