[node.js] Transaction really slow

Hello I used couchbase before, and did recently upgrade it to the newest Version :

Version: 4.6.0-3453 Enterprise Edition (build-3453)

Cluster State ID: 011-010-128)

Now I created a new bucket,
with Per Node RAM Quota:512MB
While Data RAM Quota, Index RAM Quota and Full Text RAM Quota each has 512 MB, too

var couchbase = require('couchbase');
var cluster = new couchbase.Cluster('couchbase://localhost/');
var bucket = cluster.openBucket('testProject');
var N1qlQuery = couchbase.N1qlQuery;

console.time("start");
bucket.get("test", function (err, res) {
    if(err) console.log(err);
    console.log(res);
    console.timeEnd("start");
});

Output is:

{ cas: CouchbaseCas<1485626207436800>, value: { foo: ‘bar’ } }
start: 7633.025ms

Thats seven seconds. I never had this problem before. CPU and RAM is not busy whatsoever.
couchbase npm module is version 2.3.0, npm is 3.10.6, node is v5.1.1

Does it remain that way if you run for a while, or does it start to go faster? There is some overhead to the initial startup of the client getting the topology of the cluster, building connections, etc.

Chances are, this is somewhere in bootstrap time and anything from name resolution to something going wrong during bootstrap might be affecting you. The best way to determine this might be to set the envvar for libcouchbase logging and see what the steps are.

Or, we have a small utility that we’ve written for testing connectivity in situations like this. It’s not ready for wide use yet, but I’m wondering, can you run it with the same connection string you’re using in the client and see if it identifies any problems? It checks for name resolution issues, for instance.

The took is called SDK Doctor, and there should be a binary for your platform. The output should be easy to interpret, but if you have questions please post it to a gist/pastebin and then point @brett19 and I to it.

thank you for the answer - i resolved the Problem. My nodeversion was not up to date. Now Im running v6.9.4 and everything works fine. I can still make thse tests you want (I had to downgrade nodejs, tho) but i think its not necesarry anymore.

No worries, good to hear it’s resolved. No need to downgrade to run the test, but it is interesting. If you see it again, it’d be good to get data on the cause.