I use MongoDB 3.0.3 and the C# driver 1.10.0.62.
I have 2 shards and set the writeConcern: W = 2, WTimeout = 5000
When I use the method col.Insert(data, writeConcern)
the program always throw exceptions as below:
MongoDB.Driver.MongoWriteConcernException: WriteConcern detected an error 'waiting for replication timed out at shard01'. (Response was { "ok" : 1, "code" : 64, "err" : "waiting for replication timed out at shard01", "n" : NumberLong(0) }).
These exceptions occurs frequently. Does anyone know how to handle them??