Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1343

Ability to set a retry policy

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.0.2
    • None
    • Environment:
      Cloud

      So I am running a website on Windows Azure Websites with 2-4 instances connecting to a mongo replica set. My site was originally running on a VM and has migrated to "The Cloud". Since having moved it and upgrading to the 2.0 driver the number of Mongo errors that I have seen has skyrocketed.

      I have read many posts and changed the idle timeout to 45 seconds (Azure has upped is socket idle timeout I believe to 4 minutes now...) and have had to implement retry logic and sprinkle it over the whole code base which is very ugly and painful to handle the socket errors that I am seeing.

      The SQL Server driver was updated sometime ago to handle these "Transient Connection Errors" https://msdn.microsoft.com/en-us/library/azure/ff394106.aspx.

      To make mongo easier to use in the cloud it should have some sort of retry logic/policy built into it. Ideally It would be something that could be set on the IMongoClient with overrides where appropriate.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bret@cityspark.com Bret Ferrier
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: