How many simultaneous sets can libcouchbase handle?
Hey
I'm using Couchbase server 2.0 from node.js + couchbase module + libcouchbase (all latest versions) and I'm experiencing issues when saving many documents at once.
When couchbase is fed more than 350-400 docs at a time, it just blocks (with high CPU).
None of the requests actually reach the Couchbase server - the ops/sec history graphs show zero activity.
I tried this on Mac OS X Mountains Lion 10.8.2 and also on Ubuntu 11.
The max number varies, but it still blocks the process at a certain value. As the documents get bigger, the max number decreases.
How is this supposed to be handled?
I couldn't find any way to know when the couchbase module has processed all pending saves and is ready to receive more.
var async = require("async"); var couchBase = require("couchbase"); var config = { "host": "localhost", "port": 8091, "username": "Administrator", "password": "password", "bucket": "requests" }; couchBase.connect(config, function(err, bucket) { if (err) { console.log("Unable to connect to Couchbase bucket [" + config.bucket + "]", err); process.exit(1); } console.log("Connected to Couchbase."); var ids = []; var jsonDocs = []; for (var i = 0; i < 400; i++) { ids.push(i + ""); jsonDocs.push({id:i + ""}); } console.log("Saving [" + jsonDocs.length + "] docs"); async.map(jsonDocs, function(doc, callback) { bucket.set(doc.id, doc, {}, function(err) { callback(err); }); }, function(err, results) { if (err) { console.log("Unable to save all entries", err); process.exit(1); } console.log("Saved all entries"); process.exit(0); }); });
Hello,
I have sent your message to the Libcouchbase folks.
Also have you tried to connect to JIRA with your forum username/password?
Regards
Hi,
This is probably the problem reported in http://www.couchbase.com/issues/browse/JSCBC-14 . This is one of the issues I'm currently working on.
Cheers,
Trond
Yes, it's the same problem, thanks for working on it.
Although the issue is created as a minor improvement, that's a blocker for me and other people too. I'm forced to use a standalone Java process as a proxy to Couchbase, as the Couchbase Java SDK is much more stable and more performant (as of this version).
I was able to login to JIRA with my forum username. However at JIRA login screen there's no mention that I should create an account at the forum and use that one. It just says "Contact your JIRA admins" =)
Cheers
Mladen
Seems there is already a report for this in another post.
Anyone care to file a bug, please?
Cheers
Mladen