Question

I have a website, and the homepage loading time is unusually long sometimes, not everytime, it seems a bit random, and I can't determine the steps to reproduce this error. The website can be online with no problems for 2 weeks, and be very laggy the day after ... After some investigations, it appears that it comes from one of my modules that displays a newsfeed, from a feedburner xml. Here is the code I use to load the feedburner xml :

    try
    {
        this.XmlDataSource1.DataFile = "http://feeds.feedburner.com/*****";
        this.XmlDataSource1.XPath = "rss/channel/item";

        this.XmlDataSource1.DataBind();
        this.Repeater1.DataBind();

    }
    catch (Exception exc)
    {
        LabelError.Visible = true;
        LabelError.Text += "<br /><span style='color:#FFF'>"+exc.Message+"</span>";
    }

when I get an error, en exception is raised and the message is : "Le délai d'attente de l'opération a expiré." that can be translated by : "The timeout of the transaction has expired." I found some answer on the web saying that the number of connection open to the distant server was reached, and I had to explicitly close the persistant connections. But I don't understand, unlike a SQLConnection, I don't .Open() anything, and I don't see how to .Close() this, I may be on the wrong way, but I cant believe that feedburner is unreachable (it's google servers you know ...)

any help will be appreciated :) thanks !

Was it helpful?

Solution

Resolved using asp.net cache :

<%@ OutputCache Duration="7200" VaryByParam="*" %>

when someone is loading a page, it will be loaded from the cache. this cache last 2hours (7200seconds) and if the rss dont load when the page is cached, I use a javascript asynchronous loading of my rss feed. The script is output in the catch block

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top