You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robin Wyles <ro...@robinwyles.com> on 2004/07/29 13:16:35 UTC

out of memory on build

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.jav 
a:39)
         at  
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor 
Impl.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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: [solved] out of memory on build - Monitory Garbage Collection

Posted by Gordon Anderson <go...@3months.com>.
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:rob@robinwyles.com] 
Sent: Friday, July 30, 2004 1:28 AM
To: users@cocoon.apache.org
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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Pb with eXist version (stylesheet XMLDB and xUpdate)

Posted by BASLE Florent <fb...@yahoo.fr>.
Hi all
I was previsouly running under Cocoon 2.1.2 and eXist 0.9.2 and all worked fine.
I have recently change the 2 versions with cocoon2.1.5 stable and eXist 1.0b1.
 
In my application, I use two methods to update my eXist database. xUpdate for some functions, and xmldb in XSP for the others. With these versions, all seems to work fine but I encountered some stranges bugs with xUpdate like the one discribe in eXist Wiki on tuesday 18 May 2004. So I upgrade eXist with the last CVS version (20040723) : this has resolved my problem with xUpdate but now I can't store a document with xmldb. 
I can modifiy one previously created but if I try to create one, I have the following error :
 
DEBUG (RpcConnection.java [describeResource]:355) - document /db/omf-user/20040729155653 not found!
2004-07-29 15:56:54,998 [Thread-7] DEBUG (RpcServer.java [handleException]:559) - document not found
org.exist.EXistException: document not found
 at org.exist.xmlrpc.RpcConnection.describeResource(RpcConnection.java:356)
 at org.exist.xmlrpc.RpcServer.describeResource(RpcServer.java:172)
 at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.exist.xmlrpc.AuthenticatedHandler.execute(AuthenticatedHandler.java:116)
 at org.exist.xmlrpc.AuthenticatedHandler.execute(AuthenticatedHandler.java:63)
 at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(Unknown Source)
 at org.apache.xmlrpc.XmlRpcWorker.execute(Unknown Source)
 at org.apache.xmlrpc.XmlRpcServer.execute(Unknown Source)
 at org.apache.xmlrpc.XmlRpcServer.execute(Unknown Source)
 at org.apache.xmlrpc.WebServer$Connection.run(Unknown Source)
 at org.apache.xmlrpc.WebServer$Runner.run(Unknown Source)
 at java.lang.Thread.run(Thread.java:534)
 
And the code I use worked fine with previsouly eXist version !
 
Have anybody any ideas ?
 
Thank you in advance for your response
 
Florent BASLE
Societe JOUVE
53100 Mayenne
FRANCE

		
---------------------------------
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !

Re:[solved] out of memory on build

Posted by Robin Wyles <ro...@robinwyles.com>.
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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org