A newer version of this documentation is available.

View Latest

Handling timeouts

The SDK supports configuration options to control the various timeouts that you might want to override so you can fine-tune your applications.

Internally the client uses a set of heuristics and accompanying logic to determine whether or not to retry operations if they fail with a timeout or to return a failure message to the calling application. In general, an application should not provide additional logic in the case that a timeout error is returned; however, it’s likely an indication that the application configuration may be in need of tuning or that perhaps a broader system or network level issue might be at play.

Client timeout configuration

The following timeouts are configurable either through the App.Config or Web.Config or through the ClientConfiguration object itself:

Name Description Default


The amount of time to wait on a binary operation before timing out

2,500 ms


The amount of time to wait on a View query before timing out

30,000 ms


The amount of time to wait on a N1QL query before timing out

30,000 ms


The amount of time to wait for an available TCP connection before timing out

2,500 ms


The amount of time to spend waiting for an Observe operation to meet its durability requirements before timing out

500 ms


The time between when the SDK closes a TCP connection and when it actually shuts down

10,000 ms

Certain timeouts such as ViewTimeout and QueryTimeout can also be overridden on a per query basis.

In general, the default settings are sufficient for most applications—only after encountering issues should they be adjusted.