Reputation: 1
spring-data-couchbase 2.0.0.RELEASE
4.0.0-4047 Community Edition (build-4047)
At times I face connection timeout exception being thrown
Caused by: com.couchbase.client.deps.io.netty.channel.ConnectTimeoutException: connection timed out
I am using following environment configuration
@Override
protected CouchbaseEnvironment getEnvironment() {
return DefaultCouchbaseEnvironment.builder()
.connectTimeout(TimeUnit.SECONDS.toMillis(100))
.computationPoolSize(6).autoreleaseAfter(9000).build();
}
my databuckets are auto wired in my services and I in one particular use case, I update a few documents across two data bucket. In case of connection being a bit iffy I get this exception and I am left with corrupt data of not all docs getting updated. Is there any connection retry mechanism which I can use if in case of connection failure?
Upvotes: 0
Views: 1811
Reputation: 28301
As a temporary attempt to fix, can you try forcing the Couchbase Java SDK to bump to version 2.2.4?
Add this to your pom.xml
's <dependencies>
section:
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>2.2.4</version>
</dependency>
Upvotes: 0