mardi 31 mars 2015

CouchbaseError: Client-Side timeout exceeded for operation

I am running couchbase server 3.0.1, with NodeJS SDK. I have set up a server with two buckets, and no documents. I opened a connections via:


var dbCluster = new couchbase.Cluster([my_host]); var db = dbCluster.openBucket( [my_bucket_name]);


When I try to execute 'db.upsert', I get the following error:


Error: CouchbaseError: Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout


Now the strangest part, is that the document still gets added. So the command executes successfully, but still returns the error. Also the call gets executed very fast, and definitely does not take 2.5 sec (default operation timeout).


Following this: Couchbase times out after few seconds I have tried increasing the timeout via:


db.operationTimeout = 5000;


This did not work. Again the call was executed successfully, but timeout error was returned even though the specified timeout did not pass (the call was very fast, much faster than 5 sec).


The only other support for this I could find is in this Google Groups, but it seems dead: http://ift.tt/1EzGlgP


I am running OSX Yosemite 10.10.2. Any help would be really appreciated, as I do not know where to look next.


Thank you,


Here is the code for reference:



var couchbase = require('couchbase');

var dbCluster = new couchbase.Cluster("mylocalhostname");
var db = dbCluster.openBucket( "mybucketname", function(err){
// no errors here
if(err){
console.log("Can't open bucket");
throw err;
}
else {
console.log("Successfully opened bucket");
}
});

db.operationTimeout = 5000;

db.upsert("docname", someJSON, function(err, result){

if(err){
// get an error here, even though the call successfully executes
return console.log("Error: " + err);
}
});

Aucun commentaire:

Enregistrer un commentaire