Hi Robin I have upgraded to JDK1.4.2_05 (on Linux) and at first glance I am noticing improved performance.
The problem is most likely in the garbage collection, to monitor this add the following parameters to CATALINA_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -Xloggc:/opt/tomcat/logs/garbage.log Note that the path of the garbage log may need to be changed depending on where you install Tomcat (I have Tomcat installed in /opt/tomcat]. The output in /opt/tomcat/logs/garbage.log looks like [a random snippet from a site crawl] 2335.711: [GC 2335.711: [DefNew: 54591K->6016K(54592K), 0.0591220 secs] 590460K->552643K(781528K), 0.0592110 secs] Total time for which application threads were stopped: 0.0778010 seconds Application time: 2.6544330 seconds 2338.443: [GC 2338.443: [DefNew: 54584K->6016K(54592K), 0.0645570 secs] 601211K->562884K(781528K), 0.0646460 secs] Total time for which application threads were stopped: 0.0677550 seconds Application time: 2.5284390 seconds 2341.040: [GC 2341.040: [DefNew: 54591K->6016K(54592K), 0.0572220 secs] 611460K->573138K(781528K), 0.0573110 secs] Total time for which application threads were stopped: 0.0583900 seconds Application time: 2.6614540 seconds 2343.759: [GC 2343.759: [DefNew: 54586K->6016K(54592K), 0.0633060 secs] 621708K->585683K(781528K), 0.0633890 secs] Total time for which application threads were stopped: 0.0641590 seconds Application time: 2.2577130 seconds 2346.081: [GC 2346.081: [DefNew: 54591K->6016K(54592K), 0.0516800 secs] 634259K->594866K(781528K), 0.0517690 secs] Total time for which application threads were stopped: 0.0525900 seconds Application time: 2.7354600 seconds 2348.869: [GC 2348.869: [DefNew: 54580K->6016K(54592K), 0.0663420 secs] 643430K->607189K(781528K), 0.0664280 secs] The data indicates how much time is spent on garbage collection, but also how much time the application is actually running and how often it is stopped - Application time: 2.6614540 seconds - Total time for which application threads were stopped: 0.0778010 seconds It may be worth comparing this log of your application under load to monitor the garbage collection times with each JVM. Thanks Gordon Gordon Anderson 3months.com -----Original Message----- From: Robin Wyles [mailto:[EMAIL PROTECTED] Sent: Friday, July 30, 2004 1:28 AM To: [EMAIL PROTECTED] Subject: Re:[solved] out of memory on build I upgraded to the latest Java SDK and it solved this, but it would be interesting to know why it was happening... On 29 Jul 2004, at 13:16, Robin Wyles wrote: > I am receiving out of memory errors when I try and build the release > version of Cocoon 2.1.5, details are as follows: > > OS: Redhat 7.3 > RAM: 512mb (approx 400mb free) > JDK: 1.4.0_01 > > I have tried altering the -Xms and -Xmx (lowering -Xmx to be within my > free memory) in build.sh, but it makes no difference - I always > receive the out of memory error after around 100MB is consumed and > always with the following stack trace: > > --------------------- > The system is out of resources. > Consult the following stack trace for details. > java.lang.OutOfMemoryError > at java.util.zip.ZipFile.open(Native Method) > at java.util.zip.ZipFile.<init>(ZipFile.java:112) > at java.util.zip.ZipFile.<init>(ZipFile.java:72) > at > com.sun.tools.javac.v8.code.ClassReader.openArchive(ClassReader.java: > 914) > at > com.sun.tools.javac.v8.code.ClassReader.list(ClassReader.java:1121) > at > com.sun.tools.javac.v8.code.ClassReader.listAll(ClassReader.java:1242) > at > com.sun.tools.javac.v8.code.ClassReader.fillIn(ClassReader.java:1260) > at > com.sun.tools.javac.v8.code.ClassReader.complete(ClassReader.java:980) > at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:375) > at > com.sun.tools.javac.v8.code.Symbol$PackageSymbol.flags(Symbol.java: > 497) > at > com.sun.tools.javac.v8.code.Symbol$PackageSymbol.exists(Symbol.java: > 508) > at > com.sun.tools.javac.v8.code.ClassReader.packageExists(ClassReader.java: > 1048) > at > com.sun.tools.javac.v8.comp.Enter$CompleteEnter.complete(Enter.java: > 896) > at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:375) > at > com.sun.tools.javac.v8.code.Symbol$ClassSymbol.complete(Symbol.java: > 697) > at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:583) > at > com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:376) > at com.sun.tools.javac.v8.Main.compile(Main.java:526) > at com.sun.tools.javac.Main.compile(Main.java:32) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja > va:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > rImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java: > 55) > at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:936) > at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at > org.apache.tools.ant.Project.executeTarget(Project.java:1214) > at > org.apache.tools.ant.Project.executeTargets(Project.java:1062) > at org.apache.tools.ant.Main.runBuild(Main.java:673) > at org.apache.tools.ant.Main.startAnt(Main.java:188) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) > > BUILD FAILED > /home/trentris/cocoon-2.1.5/tools/targets/compile-build.xml:60: > Compile failed; see the compiler error output for details. > --------------------- > > I have a feeling that the problem may be with the JDK, but I am not > sure where to start looking... Any ideas of where the problem might > lie would be gratefully received! > > Robin > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
