ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Roy" <ravi.a...@gmail.com>
Subject RE: Frequent java.lang.OutOfMemoryError: Java heap space error
Date Mon, 10 Dec 2007 16:47:52 GMT
Hi Steve,

Build was started and I run Jconsole and at the time when Heap space problem
occurred following is the jconsole output :

Regards,
Ravi


VM Summary
Monday, December 10, 2007 5:44:00 PM CET
------------------------------------------
Connection name: 
pid: 860 sun.tools.jconsole.JConsole
Virtual Machine: 
Java HotSpot(TM) Client VM version 1.6.0_03-b05
Vendor: 
Sun Microsystems Inc.
Name: 
860@buildserver
Uptime: 
2 minutes
Process CPU time: 
8.515 seconds
JIT compiler: 
HotSpot Client Compiler
Total compile time: 
1.239 seconds
 Live threads: 
 30
Peak: 
 34
--------------------------------
Daemon threads: 
 18
Total threads started: 
183
Current classes loaded: 
3,121
Total classes loaded: 
3,165
Total classes unloaded: 
   44
Current heap size: 
 5,740 kbytes
Maximum heap size: 
65,088 kbytes
Committed memory: 
9,892 kbytes
Pending finalization: 
0 objects
Garbage collector: 
Name = 'Copy', Collections = 162, Total time spent = 0.319 seconds
Garbage collector: 
Name = 'MarkSweepCompact', Collections = 6, Total time spent = 0.485 seconds
----------------------------------------------------------------------------
--------
Operating System: 
Windows XP 5.1
Architecture: 
x86
Number of processors: 
2
Committed virtual memory: 
37,312 kbytes
Total physical memory: 
2,087,340 kbytes
Free physical memory: 
1,240,508 kbytes
Total swap space: 
3,978,432 kbytes
Free swap space: 
2,810,136 kbyte
-------------------------------------------------------------------

-----Original Message-----
From: Ravi Roy [mailto:ravi.aroy@gmail.com] 
Sent: Monday, December 10, 2007 9:43 PM
To: 'Ant Users List'
Subject: RE: Frequent java.lang.OutOfMemoryError: Java heap space error


Thanks Steve,

I am using Ant-contrib-b03 for some repeated operations and Emma ant task
for getting code coverage, no other third party libs. Junit is always forked
while I run my junit tests.

I would run jconsole and let you know the results.

Thanks
Ravi.

-----Original Message-----
From: Steve Loughran [mailto:stevel@apache.org] 
Sent: Monday, December 10, 2007 9:15 PM
To: Ant Users List
Subject: Re: Frequent java.lang.OutOfMemoryError: Java heap space error


Ravi Roy wrote:
> Hello all,
> 
> I am running my product build with cruisecontrol using ant 1.7.0. I
> have set ANT_OPTS=-Xms=1536m -Xmx1536m, but still I am getting below 
> mentioned error, I have searched mail archive, but I see ANT_OPTS 
> settings, which I have already set, I get the following error :
> 
>     [javac] The system is out of resources.
>     [javac] java.lang.OutOfMemoryError: Java heap space
> 
> Am I doing right to set ANT_OPTS variable to increase the heap size ?
> I am running my build machine using Windows XP with 2.0 Gigabyte of 
> physical RAM.
> 
> Does somebody know how to handle this ? It is more frequent now.

1. run jconsole against the running java processes to identify the 
memory hogs
2. it may be that its cruise control running ant in process that is 
consuming the memory, and that different env variables need setting 3. fork
junit, javac and other process (separate JVM that gets cleaned up) 4. Are
you using Ivy or other third-party ant tasks?

I'd be pretty surprised that you are running out at 1.5GB; that will 
result in a footprint over the 2GB mark

-steve

PS: (top proceses on my machine right now:

vm        physical  shared
2319m 1.1g  15m S   94 18.9 248:35.14 java
2051m 475m  19m S   30  7.9  71:55.36 java
769m 569m 553m S   22  9.5  40:26.57 vmware-v

IDEA at the top, then netbeans, finally XP in a VMware image.

I'm playing with Netbeans as IDEA is getting too sluggish.

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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


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


Mime
View raw message