we are receiving below error while trying to use upsert method. we are using upsert in a loop with 10 threards.
java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:93)
at com.couchbase.client.java.CouchbaseBucket.upsert(CouchbaseBucket.java:262)
at com.couchbase.client.java.CouchbaseBucket.upsert(CouchbaseBucket.java:257)
I am also getting this logs regularly while upserting the documents using Bucket.
message=java.util.concurrent.TimeoutException java.lang.RuntimeException: java.util.concurrent.TimeoutException
27572- at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:93) ~[com.couchbase.client.java-client-2.1.4.jar:2.1.4]
27573- at com.couchbase.client.java.CouchbaseBucket.upsert(CouchbaseBucket.java:268) ~[com.couchbase.client.java-client-2.1.4.jar:2.1.4]
27574- at com.couchbase.client.java.CouchbaseBucket.upsert(CouchbaseBucket.java:263) ~[com.couchbase.client.java-client-2.1.4.jar:2.1.4]
It’s not usually helpful to pick up an old forum posting based on the same error message. Timeouts are not a bug, it’s an indication that something is not well set up in the environment.
That’s indicative of some kind of resource exhaustion in most cases. Is the network good between the client and server? Should be LAN like throughputs and latencies. Are the systems reasonable CPU/network (i.e., not Amazon EC2 micro if you’re trying to run high throughput low latency tests)
Couchbase we have installed on c4 extra large instance, and the application on c4 large. But when we build the application, sometimes the connection becomes unstable , which leads to timeout exception whenever we get or set the data in the couchbase bucket.
Are the app servers and database servers in the same region?
Another possible cause could be something in the application logic using asynchronous operations. Note that an async operation is effectively a memory allocation and if you do a lot at once, you can easily saturate the network leading to timeouts. We frequently see this with ‘dumb benchmarks’.
Can you help us help you by creating a new forums topic that really addresses what you’re trying to do, what the environment looks like, and what you’re seeing?