Error during inserting data to Couchbase 2.2.0



I am inserting a lot of data to Couchbase asynchronously with limit 1000.
After 70 000 objects from 700 000 I get following error (I reproduce it many times with different async limits - 10,100,1000):

nodejs: ../deps/uv/src/unix/stream.c:999: uv__read: Assertion `buf.base' failed.

Process finished with exit code 134

Is it problem of my code or NodeJS or Couchbase SDK 2 DP?


Hey vmaleev,
This likely indicates that memory is becoming exhausted when trying to read data from the network. You may wish to lower the number of concurrent operations you are performing.
Cheers, Brett


Hey Brett,

Thank you for your answer.
I am sorry I forgot to mention that I do it on local laptop - i5/6Gb RAM/Ubuntu 14.04.
I have about 50% free memory during the test. No external network connections involved.
Moreover I tried with 10, 100 and 1000 concurrent connections.

Here is my Coffeescript code:

  if item # some condition
    #do something with item
    if #one more condition
      #make object for insert
      bucket = new couchbase.Connection cb_config, (err) ->
        bucket.upsert "someDynamicKey",objectForInsert,(err)->
    conlole.log err
    console.log "All Items inserted"


It sounds like you may be using the 32-bit version of the node client, which would affect your ability to utilize all of the RAM available on your system. If this is not the case, it may warrant some further investigation. Do you have a stack trace available from when it crashes?
Cheers, Brett


Yes, you right. I am using 32-bit OS on laptop.
According to memory usage during script run - it takes about 3 Gb and runs on it before crush.
I have no stack trace from nodejs - only this line in WebStorm console.

Thank you for your help! I’ll test on 64-bit system and let you know if I can reproduce the issue.