Continuing the discussion from Couchbase use too much memory when insert data:
My initial guess would be that perhaps there’s something about how the script is reading the data. Is it small enough that you may post it here?
Also, what version of the PHP client? What version of libcouchbase underneath it?