Our environment
Couchbase java client 2.7.6
Couchbase Server CE6.6.0 build 7909
We have multiple clusters with 4-6 Couchbase server nodes in each of them.
Connection settings:
CouchbaseEnvironment environment = DefaultCouchbaseEnvironment
.builder()
.connectTimeout(20000)
.retryStrategy(FailFastRetryStrategy.INSTANCE)
.kvTimeout(5000)
.autoreleaseAfter(5000)
.queryTimeout(75000)
.keepAliveInterval(50000)
.keepAliveTimeout(5000)
.maxRequestLifetime(150000)
.build();
We decided to use FailFastRetryStrategy
as requests were held at times which created a ripple effect in our system.
Our current problem is that our application fails to insert of read from couchbase frequently. This happens normally after 5-6 days. Restarting the application (no change in couchbase cluster) invariably fixes the issue. Application fails with following error always.
Failed to insert params in couchbase with error: java.lang.RuntimeException: java.util.concurrent.TimeoutException: {"b":"mybucket","s":"kv","t":5000000,"i":"0x79c97e"}
We are also seeing similar issue when a node fails over. A Buch of requests fails with following error which create a service issue at the customer end.
in couchbase with error: com.couchbase.client.core.RequestCancelledException: Could not dispatch request, cancelling instead of retrying.
Our cluster configuration is such that 3 nodes will have data, query, index
and search
services and 1 with data, query
and index
and remaining (if there are more than 4 nodes) with just data
service.
Appreciate some help to identity and resolve these two issues. Currently we are clueless as why insert and search fail every few days. We are suspecting that the second issue is due to FailFastStrategy
.