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...
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.
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.
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.is working on a reply...