Page 1 of 1

rss sidebar fetching timeout

Posted: Wed Dec 14, 2005 4:55 am
by jerwarren
I apologize if this has been addressed already in a post 0.9 version, but I've been running into a problem off and on for a while. Searching the forum about it proved fruitless, so I'm just gonna ask it here.

When an RSS feed being fetched by a sidebar becomes unreachable, every page load of the blog takes the same amount of time as the timeout for loading the feed. Basically 20-30 seconds of waiting to try to fetch the feed before displaying the page, only to show an error saying the feed is unreachable in the sidebar.

Perhaps the page should display before attempting to update the feed, or even spawn a background process of some kind to handle it?

Re: rss sidebar fetching timeout

Posted: Wed Dec 14, 2005 3:45 pm
by garvinhicking
Actually the sidebar plugin in its recent version should already touch the cache file, so that when a feed timesoute, the cache will deliver as an empty feed until the next "try" is achieved.

This is done with this piece of code in plugins/serendipity_plugin_remoterss:

Code: Select all

                } elseif ($feedtype == 'rss') {
                    $this->debug('URLCheck succeeded. Touching ' . $feedcache);
                    // Touching the feedcache file will prevent loops of death when the RSS target is the same URI than our blog.
                    @touch($feedcache);

Do you have that line/code? You could remove the "@" before the touch command, maybe that one creates errors on your system?

Spawning a background process sounds easy, but on webpages this isn't very feasibly and only works via iframes, which I'd like to avoid.

Best regards,
Garvin