You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Schmitt, Christian" <Ch...@Dresdner-Bank.com> on 2000/12/21 09:38:40 UTC

[C2] Memory consumption

Hi all,
after getting C2 and Tomcat 4.0 CVS working again (thanks Stuart!) I'm
having my next challenge.
When C2 tries to compile the sitemap after a TC restart I get the following
stacktrace in the browser (besides the usual C2 error message):

org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not
available.
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:88)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:243)
        at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:317)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:215)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:251)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:196)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2038)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161
)
        at
org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:159)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
818)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
        at java.lang.Thread.run(Thread.java:484)

After looking at the log file I found the following:

2000-12-20 16:34:26 ERROR   17447   [cocoon  ] (Thread-13): Error compiling
sitemap, caught java.lang.OutOfMemoryError: null

This happens on our Linux box (Debian 2.2, Sun JDK 1.3). On my NT box I do
get the sitemap compiled, but just barely (I think). Memory usage of the JVM
is at about 72MB after compiling the sitemap (on NT that is).

The I did some debugging to find out where the memory hog is, and I traced
it down to the generateCode() method in
org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.java.
There on line 123 the call "this.rootReader.parse(input);" is throwing the
OutOfMemory exception.

This morning I saw Robin Green committed a change to todo.xml:
  +  <action context="code" assigned-to="RDG">
  +   Track down cause of OutOfMemoryError and multiple PDF problems.

May be it's got something to do with my issue as well.


Cheers,
Christian Schmitt


Re: [C2] Memory consumption

Posted by Paul Russell <pa...@luminas.co.uk>.
* Schmitt, Christian (Christian.Schmitt@Dresdner-Bank.com) wrote :
> After looking at the log file I found the following:
> 
> 2000-12-20 16:34:26 ERROR   17447   [cocoon  ] (Thread-13): Error compiling
> sitemap, caught java.lang.OutOfMemoryError: null
> 
> This happens on our Linux box (Debian 2.2, Sun JDK 1.3). On my NT box I do
> get the sitemap compiled, but just barely (I think). Memory usage of the JVM
> is at about 72MB after compiling the sitemap (on NT that is).

Yeah, I noticed this yesterday, too. I'm not sure what's causing it.

> The I did some debugging to find out where the memory hog is, and I traced
> it down to the generateCode() method in
> org.apache.cocoon.components.language.markup.LogicsheetCodeGenerator.java.
> There on line 123 the call "this.rootReader.parse(input);" is throwing the
> OutOfMemory exception.

Okay. I'm just about to commit a change which should make it easier
to track down the exact location of the out of memory error. Having
said that, there's no guaruntee that the place it's running out of
memory is the place that's eating RAM. Sometimes I wish we still had
pointers. Can you update your checkout and try again? If you can
get the error to re-occour, then look in the log, and you should
find a stack trace next to the OutOfMemoryError -- post that here
and we'll see if we can work it out!

> This morning I saw Robin Green committed a change to todo.xml:
>   +  <action context="code" assigned-to="RDG">
>   +   Track down cause of OutOfMemoryError and multiple PDF problems.
> 
> May be it's got something to do with my issue as well.

Nope, sadly not. Much though we'd love to have Robin's help on this one,
he's kinda busy looking after Cocoon 1 :)


Paul.

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk