Amazon max retry attempts

May 16, 2010 at 6:27 AM
Edited May 16, 2010 at 6:27 AM

Ever since upgrading to the latest Simple Savant release (from an early version), I've been getting the following exception from Amazon every so often:

Amazon.SimpleDB.AmazonSimpleDBException was caught
  Message=Maximum number of retry attempts reached : 3
       at Amazon.SimpleDB.AmazonSimpleDBClient.PauseOnRetry(Int32 retries, Int32 maxRetries, HttpStatusCode status)
       at Amazon.SimpleDB.AmazonSimpleDBClient.Invoke[T](IDictionary`2 parameters)
       at Amazon.SimpleDB.AmazonSimpleDBClient.CreateDomain(CreateDomainRequest request)
       at Coditate.Savant.Core.DecoratingSimpleDB.CreateDomain(CreateDomainRequest request) ... (etc.)


Has anyone else seen this?  Any suggestions?  Thanks!

May 16, 2010 at 2:52 PM

I've been seeing that some in the past week too with no change in Simple Savant versions. Looks like the SimpleDB service itself has been having more than the normal number of hiccups.

You can bump up the value of AmazonSimpleDBConfig.MaxErrorRetry if that helps (3 is the default value). This property is in the AWS SDK, by the way--Savant doesn't do retries.

May 16, 2010 at 9:12 PM

   I could see from the exception frame trace that it was Amazon, and that Savant was not involved.  This new Savant release is terrific!  I have a small WinForm app for my son, and it comes up much more quickly by initially loading only what's first needed, and letting the rest load asynchronously.  I really appreciate your sharing this with us!
  By the way, can you give me any hints on how/where to bump up the retry count in AWS?  Thanks again!


May 17, 2010 at 2:17 AM

Thanks for the kind words! Glad to hear it's working well for you. Please add a rating or review if you have a chance--that will help other prospective users evaluate the library.

You can change any of the Amazon config values by creating and configuring the AmazonSimpleDBClient yourself and passing it to Savant:


string awsAccessKeyId = ConfigurationManager.AppSettings["AwsAccessKeyId"];
string awsSecretAccessKey = ConfigurationManager.AppSettings["AwsSecretAccessKey"];

var savantConfig = new SavantConfig();
var awsConfig = new AmazonSimpleDBConfig { MaxErrorRetry = 5
}; var simpleDb = new AmazonSimpleDBClient(awsAccessKeyId, awsSecretAccessKey, awsConfig); SimpleSavant savant = new SimpleSavant(simpleDb, savantConfig);



May 17, 2010 at 4:33 AM

Many thanks - I would have been very hard-pressed to come up with the code!  The most common point of timeout has been the initial connection, which makes a lot of sense in some ways.  I ended up doubling the default, and it's been much more reliable.  I will indeed add a rating/review, and should have done so long ago.  I've been using it since 0.2, and every bug I've encountered has been my own.  It's a great package!  Thank you!




May 17, 2010 at 1:31 PM

Thanks for the review!