5

I want to run a very simple mongo query (with Robo 3T as mongo client) on my cosmoDB instance with Mongo API.

db.getCollection('events').aggregate(
    [
    { $match: {customer: "printabled"}},
    /*{ $count: "PEZZI_INC" }*/
    { $group: {
        _id: null,
        /*_id: { day: { $dayOfMonth: "$start_time"}},*/
        totalCOUNTTEMP:{
            $sum:"$AMBIENT_TEMPERATURE"
            }
      }
    }
    ]
);

but i get the following error error message picture

if the link does not work, here is the text error.

Assert: command failed: {
    "_t" : "OKMongoResponse",
    "ok" : 0,
    "code" : 50,
    "errmsg" : "Request timed out.\r\nActivityId: c9fb8aa0-0000-0000-0000-000000000000, Microsoft.Azure.Documents.Common/1.22.0.0",
    "$err" : "Request timed out.\r\nActivityId: c9fb8aa0-0000-0000-0000-000000000000, Microsoft.Azure.Documents.Common/1.22.0.0"
} : 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
Tiziano
  • 51
  • 4
  • Did you try running getLastRequestStatistics to see how many RU/s the query used? https://learn.microsoft.com/en-us/azure/cosmos-db/set-throughput#GetLastRequestStatistics – Matt May 18 '18 at 18:50
  • how did you solve this? – Cocuba Feb 22 '19 at 21:25
  • 1
    This is not about RU, if you want to use too many RU the error message is saying something like "Request rate is too large" – Tomasz Swider May 14 '19 at 11:26

0 Answers0