Javascript node.js上的程序性二维数组mongoDB insert内存不足

Javascript node.js上的程序性二维数组mongoDB insert内存不足,javascript,node.js,mongodb,nodejitsu,Javascript,Node.js,Mongodb,Nodejitsu,我正试图通过node.js服务器将一个2000 x 2000 2d阵列插入我的mongoDB实例 我现在的做法是: for (i=0; i<2000; i++){ //i = height of the tile map for(x=0; x<2000; x++){ //x is the width of the tile map driver.mongo.insert('

我正试图通过node.js服务器将一个2000 x 2000 2d阵列插入我的mongoDB实例

我现在的做法是:

for (i=0; i<2000; i++){
            //i = height of the tile map
            for(x=0; x<2000; x++){
                //x is the width of the tile map
                driver.mongo.insert('worldTiles', {loc: [x,i], elevation: obj.server.theArray[i][x]}, function (err,results){
                    if(!err){

                    }else{
                        console.log('Ran into an error inserting into worldTiles on Mongo');
                    }
                })
            }
            console.log(i);
        }

for(i=0;i问题似乎出在我的mongoDB实例的提供程序上。我刚刚发现,在jitsu上后台处理mongo实例时,内存使用大小有~64MB的限制。因此,就在此时,我遇到了“内存不足”错误

希望他们能以某种方式使错误消息更具描述性,包括什么设备的内存不足……转眼间


案例结束。

这是什么mongodb驱动程序?我不熟悉
driver.mongo.insert
语法。它是一个非常基本的私有驱动程序,只是包装了nativeParser。我可以用另一个驱动程序来试一下……您推荐的任何驱动程序?JavaScript支持的标准10gen驱动程序: