Document inserted successfully although getting AmbiguousTimeoutException

We are getting AmbiguousTimeoutException sometimes while inserting documents on Couchbase. We expect that it shouldn’t be inserted on Couchbase. But the document is inserted successfully although getting this exception.

We are getting exception like this:

What should we do? What do you suggest to fix that problem?

Java version: 11
couchbase-java-client version: 3.0.3
couchbase server version: Enterprise Edition 6.6.1 build 9213

Cluster environment

 ClusterEnvironment clusterEnvironment = ClusterEnvironment.builder()

Hi @ertugrulungor,

Could you please try running the application with logging enabled in debug mode & share the logs?

The error can be caused by a few reasons such as the one in this question Facing AmbiguousTimeoutException, SelectBucketFailedEvent, Unambiguous Timeout Exceptions

Hi @ertugrulungor
The AmbiguousTimeoutException (as opposed to UnambiguousTimeoutException) indicates that the operation may or may not have succeeded. Unfortunately ambiguity like this is impossible to completely avoid in any distributed system. The classic example is sending a mutation request to the server, and the network going down immediately after: it’s impossible to know if the server received and acted on the request or not.

You can give the operation more time to complete, which will help resolve some ambiguous situations (especially if durability is being used), by increasing the kvDurableTimeout (for operations performed with durability) and/or kvTimeout config parameters.