Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Mulholland 2 posts 22 karma points
    Oct 14, 2015 @ 09:53
    Dan Mulholland
    0

    The remote server returned an error: (429) Too Many Requests.

    I've just launched a site using your package, everything was fine up until launch, I've been getting reports that the site is down, but when I go to look, it's there, it's an intermittent issue. I checked the logs and I get the following error:

    The remote server returned an error: (429) Too Many Requests.

    The error is caused by uTwit.GetLatestTweets

    I've removed it for now but the client want their twitter feed back, is there anything I can configure to:

    a. prevent the error
    or
    b. just show nothing if the error is returned?

    I'm not too c# savvy and can't find the code behind the method, I don't know if it's a case of catching the response before attempting to display the tweets? Or even better configure it so it prevents excessive requests by caching...

    Need to be snappy with this.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Oct 14, 2015 @ 11:36
    Sebastiaan Janssen
    0

    You are probably calling GetLatestTweets for each request to a page in the site. Twitter does rate limiting and I think you can do maybe a 100 per 10 minutes (or something like that, don't know how much it actually is). What you need to do is put caching in place so that this method is only called once every 10 minutes or so.

    So if you put this GetLatestTweets call in a partialview macro for example then you can configure the macro to cache the results for a while.

Please Sign in or register to post replies

Write your reply to:

Draft