Hi, we are facing some issue with couchbase connection issue when handling a large amount of trasaction:
and the reason is , even the connection to http://" + endPoint + "/pools/default/buckets/" + bucket
success
sometimes
myBucket = myCluster.openBucket(bucket);
myBucket.query('query',function(){
});
this method will fail. because myBucket is undefined
To prevent this, I change this method to a callback
myBucket = myCluster.openBucket(bucket);
myBucket.on('connect', function () {
myBucket.query('query',function(){
}).on("error",function(){
//do some thing to reopen the bucket
});
}
can somebody tell me what`s the best solution to reopen the bucket,and continue the query work?
I`m using couchbase v2.1.2
Thank you very much!