[SERVER-77038] db.<collection>.stats() - BufBuilder attempted to grow .. past the 64MB limit Created: 11/May/23 Updated: 23/Oct/23 Resolved: 23/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vinicius Grippa | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Case: | (copied to CRM) | ||||||||
| Description |
|
Hi, This might be more of a feature request rather than a bug. If you have a sharded cluster with lots of shards and a collection with several indexes, it is common to see the error following error when running the command from the router: In this example, I can reproduce the issue with 50 shards and a collection with 50-100 indexes:
So, as Mongo continues to be used over these years, the clusters continue to grow and face architecture limitations. I suggest documenting this limitation or considering it a bug and increasing the limit (ideally, making it configurable through a parameter). Thanks, |
| Comments |
| Comment by Eric Sedor [ 23/Oct/23 ] | ||||
|
Apologies Vinicius; it looks like this ticket ended up in an untracked combination of states. I'm deduping this against The newer implementation of $collStats makes use of a cursor to return results, which overcomes the need to rely on a single document response. | ||||
| Comment by Eric Sedor [ 11/May/23 ] | ||||
|
Hi vgrippa@gmail.com, is this using the legacy mongo shell? If so can you reproduce using the newer mongosh? As well, I'd be interested to see if the $collStats aggregation stage gets you a better experience. | ||||
| Comment by Vinicius Grippa [ 11/May/23 ] | ||||
|
And still talking about the stats() function. If we pass the bufBuilder, we can still face the bson size limitation:
|