@brett19 In the following code , As you can see bigArray
is an array with 1million uuidv4 , It just used RAM
As you can see for
loop is before openning connection , Why upsert
fails with Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout
If I remove bigArray
or fill it with 1K instead of 1M , upserting works . I have free memory for even 10M array item
const couchbase = require('couchbase');
const uuidv4 = require('uuid/v4');
const bigArray= [];
for (i = 0; i < 1000000; i++) {
bigArray.push(uuidv4());
}
const cluster = new couchbase.Cluster('couchbase://localhost');
const bucket = cluster.openBucket('test');
bucket.upsert('test', {"test":1}, function (err) {
if (err) {
throw err;
}
console.log('Done');
});