MongoDB C#驱动程序:等待复制超时

时间:2015-06-18 02:58:50

标签: c# mongodb

我使用MongoDB 3.0.3和C#驱动程序1.10.0.62 我有2个分片并设置writeConcern: W = 2, WTimeout = 5000
当我使用方法col.Insert(data, writeConcern)时,程序总是抛出异常,如下所示:
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) }).
这些例外经常发生。有谁知道如何处理它们?

0 个答案:

没有答案