zoukankan      html  css  js  c++  java
  • "errmsg" : "distinct too big, 16mb cap",

    repl_test:PRIMARY> show dbs
    admin                  0.000GB
    direct_vote_resource  16.487GB
    local                 14.860GB
    personas              30.809GB
    recommendation         0.370GB
    statistics_visit       0.138GB
    superpub              75.234GB
    test                   0.000GB
    repl_test:PRIMARY> use superpub
    switched to db superpub
    repl_test:PRIMARY> db.ask.count()
    123989434
    repl_test:PRIMARY> db.ask.find({}).limit(1)
    { "_id" : ObjectId("5b1103341ac2386e164dd796"), "md5" : "b1b791efdb4745e0", "ans                                    wer" : "成本和37砖混的差不多的、、不过保温隔热效果好的", "likenum" : 0, "keyword                                    " : "海容", "question" : "用海容模块建大棚成本高不高??" }
    repl_test:PRIMARY> db.ask.distinct("md5").limit(3)
    2018-11-23T15:27:29.186+0800 E QUERY    [main] Error: distinct failed: {
            "ok" : 0,
            "errmsg" : "distinct too big, 16mb cap",
            "code" : 17217,
            "codeName" : "Location17217"
    } :
    DBCollection.prototype.distinct@src/mongo/shell/collection.js:1745:1
    @(shell):1:1
    repl_test:PRIMARY>
    

      

    repl_test:PRIMARY> db.ask.aggregate([{$match:{}}, {$project:{"md5":true}}, {$group:{_id:"$md5"}}, {$group:{_id:null,                                       count:{$sum:1}}}])
    assert: command failed: {
            "ok" : 0,
            "errmsg" : "Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt                                        in.",
            "code" : 16945,
            "codeName" : "Location16945"
    } : aggregate failed
    _getErrorWithCode@src/mongo/shell/utils.js:25:13
    doassert@src/mongo/shell/assert.js:16:14
    assert.commandWorked@src/mongo/shell/assert.js:370:5
    DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
    @(shell):1:1
    
    2018-11-23T15:42:40.779+0800 E QUERY    [main] Error: command failed: {
            "ok" : 0,
            "errmsg" : "Exceeded memory limit for $group, but didn't allow external sort. Pass allowDiskUse:true to opt                                        in.",
            "code" : 16945,
            "codeName" : "Location16945"
    } : aggregate failed :
    _getErrorWithCode@src/mongo/shell/utils.js:25:13
    doassert@src/mongo/shell/assert.js:16:14
    assert.commandWorked@src/mongo/shell/assert.js:370:5
    

     

  • 相关阅读:
    求一个二维数组的最大子矩阵
    在一整型数组中找到此数组中子数组和的最大值
    软件工程个人小项目:写一个程序,分析一个文本文件(英文文章)中各个词出现的频率,并且把频率最高的10个词打印出来
    Redis 为什么这么快?
    在netfarmerwork3.5版本的winform下执行string串中的代码
    c# 反射(Reflection)详解
    string,特殊的引用类型
    c#使用HashSet<T>集合去重
    c# .Net重试机制
    观察者模式
  • 原文地址:https://www.cnblogs.com/rsapaper/p/10007893.html
Copyright © 2011-2022 走看看