BUCKET_NOT_AVAILABLE or BUCKET_OPEN_IN_PROGRESS when Upserting data

Hey,
I’m writing a data pipeline that upserts data into Couchbase. I use the Java 3.0 SDK to do so, but when I upsert data I get the following:

Caused by: com.couchbase.client.core.error.AmbiguousTimeoutException: UpsertRequest{"cancelled":true,"completed":true,"coreId":1,"idempotent":false,"reason":"TIMEOUT","requestId":46575,"requestType":"UpsertRequest","retried":13,"retryReasons":["BUCKET_NOT_AVAILABLE","BUCKET_OPEN_IN_PROGRESS"],"service":{"bucket":"bucket4Bloom","collection":"_default","documentId":"927e2ec5-334f-4175-afb9-9cac710eeb0a","opaque":"0xb648","scope":"_default","syncDurability":{"present":false},"type":"kv"},"timeoutMs":2500,"timings":{"encodingMicros":3,"totalMicros":2842952}}

I saw a topic saying to use waitUntilReady and so I did, but it didn’t seem to help :frowning:
Any idea on what can help me?

Thanks :slight_smile:

2 Likes

I am also having the similar issue when I fetch data from a default sample bucket

INFO: [com.couchbase.node][NodeConnectedEvent] Node connected {“coreId”:“0xcac4ab200000001”,“managerPort”:“8091”,“remote”:“13.68.186.249”}
Exception in thread “main” com.couchbase.client.core.error.UnambiguousTimeoutException: GetRequest {“cancelled”:true,“completed”:true,“coreId”:“0xcac4ab200000001”,“idempotent”:true,“reason”:“TIMEOUT”,“requestId”:3,“requestType”:“GetRequest”,“retried”:14,“retryReasons”:[“BUCKET_OPEN_IN_PROGRESS”],“service”:{“bucket”:“gamesim-sample”,“collection”:"_default",“documentId”:“Aaron0”,“opaque”:“0x2”,“scope”:"_default",“type”:“kv”},“timeoutMs”:2500,“timings”:{“totalMicros”:2512705}}
at com.couchbase.client.java.AsyncUtils.block(AsyncUtils.java:51)
at com.couchbase.client.java.Collection.get(Collection.java:184)
at simple_project.main(simple_project.java:23)
Suppressed: java.lang.Exception: The above exception was originally thrown by another thread at the following location.
at com.couchbase.client.core.msg.BaseRequest.cancel(BaseRequest.java:163)
at com.couchbase.client.core.Timer.lambda$register$2(Timer.java:157)
at com.couchbase.client.core.deps.io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:672)
at com.couchbase.client.core.deps.io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:747)
at com.couchbase.client.core.deps.io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:472)
at com.couchbase.client.core.deps.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)

Can someone answer on this issue as there is very less help available on this issue online or in stackoverflow. It will be very difficult to encourage people to use couchbase unless there is good support for this.

1 Like

@sudhsrk well you are reporting a timeout which can have many root causes. have you tried performing a bucket.waitUntilReady() before performing your bucket level operations?

I too get this issue even I have used the below:
spring.couchbase.env.timeouts.connect=400000
spring.couchbase.env.timeouts.key-value=400000
spring.couchbase.env.timeouts.query=400000
spring.couchbase.env.timeouts.view=400000
spring.couchbase.env.timeouts.search=400000
spring.couchbase.env.timeouts.key-value-durable=400000

Any updates on this ?