Cache contention conundrum (was RE: RSS macro make the entire site to hang)

THOMAS, BRIAN M (ATTSI) bt0008 at att.com
Tue May 8 17:18:13 CEST 2007


Ludovic:

We've battled this problem for quite a while now, without much success - even to the point of putting a ridiculously long (e.g. > 24hrs) cache lifetime, and independently refreshing the cache.  In some cases, we finally just removed the problematic feed.

When I built a plugin to cache the results of a long-lived and expensive fetch of an XML document, I found another difficulty that may shed light on this situation:  Occasionally, my plugin hangs (forever) even though the fetch isn't having problems.  Once this starts, any other thread that attempts to access the cached XML object also hangs.

My working hypothesis is that either an error in the fetching - I'm using org.dom4j.io.SAXReader.read(InputStream) - or a user abandoning the page is causing the refresh in one thread to leave the lock in place, causing any other thread to wait for the update, which now won't happen.  I haven't been able to verify this, but it's the nearest thing to an explanation I can come up with.

If this is the case, I'm thinking that I should set the cache parameters to disable waiting on a refresh, if I can do it at the granularity of an individual cache instance.  The correct way is probably to find what's causing the orphaned lock, if that's what's happening.  I have not been able to evoke any log output to give me clues on this.

brain[sic]  

> -----Original Message-----
> From: Ludovic Dubost [mailto:ludovic at xwiki.com] 
> Sent: Monday, May 07, 2007 12:25 PM
> To: xwiki-users at objectweb.org
> Subject: Re: [xwiki-users] RSS macro make the entire site to hang
> 
> 
> Hi,
> 
> There is not much XWiki can do if a RSS feed displayed in a 
> page is slow or does not respond.
> We have improved a little XWiki's behavior by adding a 
> timeout (default to 60 seconds) in the latest trunk code.
> 
> However this won't completely solve your problem.
> If you want to solve it, you want either to use a cache (this 
> exists in the FeedPlugin) or to use the FeedPlugin's 
> capability of storing RSS Feeds in Wiki pages.
> Checkout the FeedPlugin API
> 
> Ludovic
> 
> Antonio Goncalves a écrit :
> > Hi,
> >  
> > I've created a panel that is displayed on the right side (of every 
> > page). This panel displays the five top titles of an 
> external weblog 
> > using the rss macro :
> >  
> > {rss:feed=http://jroller.com/rss/agoncal|count=5
> > <http://jroller.com/rss/agoncal%7Ccount=5>}
> >  
> > The problem that I'm facing is that the rss feed is broken 
> (JRoller's 
> > problem). And because of that, the macro hangs (for quite a 
> while) and 
> > then throws an exception. Because it's displayed on everypage, 
> > navigating in the wiki becomes really slow. Is there a way to do 
> > something better ?
> >  
> > Antonio (BTW I'm using RC2)
> >  
> > 12:40:01,578  WARN http-8080-Processor25 
> > http://localhost:8080/xwiki/bin/view/Main/ 
> MacroFilter:handleMatch:139
> > - MacroFilter: unable
> > java.io.IOException: Error processing 
> http://jroller.com/rss/agoncal: 
> > Connection timed out: connect
> >         at
> > com.xpn.xwiki.render.macro.rss.RSSMacro.execute(RSSMacro.java:102)
> >         at org.radeox.filter.MacroFilter.handleMatch
> > (MacroFilter.java:117)
> >  
> >  
> > 
> ----------------------------------------------------------------------
> > --
> >
> >
> > --
> > You receive this message as a subscriber of the 
> xwiki-users at objectweb.org mailing list.
> > To unsubscribe: mailto:xwiki-users-unsubscribe at objectweb.org
> > For general help: mailto:sympa at objectweb.org?subject=help
> > ObjectWeb mailing lists service home page: 
> > http://www.objectweb.org/wws
> >   
> 
> 
> --
> Ludovic Dubost
> Blog: http://www.ludovic.org/blog/
> XWiki: http://www.xwiki.com
> Skype: ldubost GTalk: ldubost
> AIM: nvludo Yahoo: ludovic
> 
> 
> 




More information about the users mailing list