Running out of java heap space with ant

Hi there, I am running out of heap space with an ant task. Is there a way to tweak the vm settings of the java process running it?

I'm running FB4.2.0.305

Cheers,

Hi Ignace,

If you go to your Java task(s) in your Ant project, you can set “fork” to True and then “maxmemory” to the amount of memory to allocate for the forked VM.

http://ant.apache.org/manual/CoreTasks/java.html

Regards,

Angus

Posted By Angus Gratton on 28 Nov 2007 4:31 PM
Hi Ignace,

If you go to your Java task(s) in your Ant project, you can set "fork" to True and then "maxmemory" to the amount of memory to allocate for the forked VM.

http://ant.apache.org/manual/CoreTasks/java.html

Regards,

Angus


Hi Agnus,

That works if I would be running plain java sessions from ant, but for specific ant-tasks (cvschangelog etc..) you either need to wrap them in java tasks, or you can not use this feature. Since I needed to set the memory dimensions of the java processes that is ant itself, I ended up modifying the referred ant.bat that one needs to specify in the options panel, so that it always has enough room for processing huge cvs logs. Would be a nice-to-have feature in the options panel I reckon.

Best regards,

Ignace

 


Hi Ignace,

Thanks for the update. I’m totally surprised that CVS is using enough memory to run out of heap space, I would have thought the java sessions would use far more.

I’ll put it on the to-do list to see if we can add it.

Regards,

Angus

Great!

I should add that the default ant.bat does not really have anything that can be used to specify the -Xms -Xmx arguments, so it might involve bundling a custom ant.bat or altering the existing script.

Cheers!