Client Settings

You may adjust some settings on the Cluster and Bucket objects. Settings set on a Cluster object applies to any subsequently created Bucket objects (though not on ones created before the setting was modified).

Some settings are:

  • Cluster.SetConnectTimeout - sets the time the client will block on a single Cluster.OpenBucket call

  • Cluster.SetServerConnectTimeout - The connect timeout per-server, if multiple servers are passed, indicates how long the SDK should wait for each of them to connect.

  • Cluster.SetN1qlTimeout, Bucket.SetN1qlTimeout - sets the timeout for N1QL queries. You can also modify the N1QL timeout on a per-query basis.

  • Bucket.SetOperationTimeout - sets the timeout for document (KV) operations such as Bucket.Get and Bucket.Upsert

  • Bucket.SetDurabilityTimeout - sets the timeout for durability operations, indicating how long the SDK should wait for durability criteria should be satisfied before failing the operation.