Query Timeout

161 views
Skip to first unread message

Foosh

unread,
Jun 20, 2015, 12:38:04 AM6/20/15
to couc...@googlegroups.com

I'm trying to use the Java SDK to write a simple query but no matter what I try, it always times out with the following exception


java.util.concurrent.TimeoutException
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:93)
at com.couchbase.client.java.CouchbaseBucket.query(CouchbaseBucket.java:510)

At this point, I'm just trying to query the sample data to get something working but it still times out. I referenced the code in tutorial at http://docs.couchbase.com/developer/java-2.1/tutorial.html. The code I'm using is 

CouchbaseCluster cluster = CouchbaseCluster.create(myServerAddress);
Bucket bucket = cluster.openBucket("beer-sample", 10, TimeUnit.MINUTES);

ViewResult result = bucket.query(ViewQuery.from("beer", "by_name").limit(1), 10, TimeUnit.MINUTES);

What am I doing wrong? I feel like I'm missing something simple.

I appreciate any help.

Bill

Caio Costa

unread,
Jul 18, 2016, 10:23:13 PM7/18/16
to Couchbase
Have you already find out the solution for this issue? I'm having the same problem. It's ridiculous! When I try to execute a N1QL query more than 15 times, it always throws those exceptions!

Gerald

unread,
Jul 19, 2016, 1:52:45 PM7/19/16
to Couchbase
You can set both the indexer timeout and the query timeout. Can you please post on Stack Overflow or Couchbase forums, and include both your index and query.

Gerald

Joe Phillips

unread,
Aug 24, 2016, 11:41:38 AM8/24/16
to Couchbase

We've experienced the same behaviour several times. In our case it has been always fixed by creating a View (index).

Joe
Reply all
Reply to author
Forward
0 new messages