[SERVER-15895] Aggregation Query returning exception: Version 2.6 Created: 31/Oct/14  Updated: 03/Dec/14  Resolved: 03/Dec/14

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Jitendra Gehlot Assignee: Ramon Fernandez Marina
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MongoQuery_modified.txt    
Issue Links:
Duplicate
duplicates SERVER-6036 Disable cursor timeout for cursors th... Closed
Participants:

 Description   

Hi Team,

We are running an aggregation query(Attached with issue) on a collection which consists of 200 million records on 3-node sharded cluster(AWS).

Volume of records per day: 500,000 to 700,000.

While running query for date range 1 month(January), we are getting result.

If we run the same query with date range for more than 1 month, we are getting below exception:

Error("Printing Stack Trace")@:0
()@src/mongo/shell/utils.js:37
([object Object],[object Object],[object Object],[object Object])@src/mongo/shell/collection.js:866
@(shell):7
 
uncaught exception: aggregate failed: {
                "errmsg" : "exception: getMore: cursor didn't exist on server, possible restart or timeout?",
                "code" : 13127,
                "ok" : 0
}

Please let us know, if any modification requires in query execution.



 Comments   
Comment by Ramon Fernandez Marina [ 03/Dec/14 ]

Thanks for your report jitendra.gehlot@opussoft.com. There's a known issue with large aggregation queries on sharded clusters described in SERVER-6036.

A specific solution would depend on your shard key and data distribution, but in general you may want to try modifying your query so it returns the documents you need faster. This may involve adding additional indexes to better support the query, checking that specific shards are not holding too many of those documents (while others have too little or none), and maybe even scaling your shards vertically with faster CPUs and storage devices.

That being said, I'm marking this ticket as a duplicate of SERVER-6036. Please feel free to vote for that ticket and watch it for status updates.

Regards,
Ramón.

Generated at Thu Feb 08 03:39:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.