cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans>
Subject Re: cache problem
Date Fri, 09 Jan 2004 20:35:43 GMT

Dan wrote:
> Hello,
> I'm having a cache-related problem but I don't know how to diagnose it. 
> What is happening is that for a few (not all) of my requests, cocoon 
> returns the wrong file. For example, my sitemap entry is:
> <map:match pattern="docs/*_main.html">
>    <map:generate src="xml/{1}.xml"/>
>    <map:transform src="stylesheets/main.xsl"/>
>    <map:serialize/>
> </map:match>
> <map:match pattern="docs/*_main.html">
>    <map:generate src="xml/{1}.xml"/>
>    <map:transform src="stylesheets/contacts.xsl"/>
>    <map:serialize/>
> </map:match>

I don't understand.
1) If a request is cached then none of your pipeline components get 
executed at all
2) Given above sitemap fragment (in that order), no request can reach 
the second pipeline because you're matching on the same pattern 
3) Are you sure you're getting back the data you think you're getting 
back? Try adding debug views so you can verify each step in the pipeline.

Is upgrading to 2.0.4 an option? Try searching for 
open/solved bugs in the cocoon 2.0 branch, maybe it has come up before.


> For a couple of requests, for example requesting /docs/file1_main.html i 
> get file80.xml with the main.xsl stylesheet applied to it where I should 
> have gotten file1.xml with main.xsl applied. For some other requests, 
> cocoon not only returns the wrong file, but applies the wrong 
> stylesheet. For example requesting /docs/file30_main.html gets me file40 
> with contacts.xsl stylesheet applied.
> This behavior only happens for a requests, but for those requests, it 
> happens consistently. Most requests are just fine and return what they 
> should.
> I know its a cache problem because I can stop tomcat, delete the cache 
> directory and restart and the problem goes away. I don't know much about 
> how caching is implemented so I don't know how to approach this 
> problem.  I figure someone has seen it before though, so any pointers 
> would be appreciated.  The problem seems to happen after the application 
> has been running for a while and its cache file gets big. When I last 
> saw this problem, the cocoon-cache.dat file was approximately 900MB.  
> Clearing the cache when this happens is not a real solution as the xml 
> files I'm using are quite big and having things cached is a big 
> performance bonus.
> My app is based on Cocoon 2.0.3 and is running under Tomcat 4.1.18.
> Thanks,
> Dan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message