A bug in MONGODB 2.6.8 [Assertion:13548:bufbuilder attempted to grow () to 134217728 bytes, past the]

Source: Internet
Author: User
Tags mongodb

Environment: mongoDB2.6.8 Cluster,
In the afternoon suddenly found 4 from the node, hanging 3, all appear the following prompts:

2016-03-11t16:53:02.483+0800 [conn312773] Assertion:13548:bufbuilder attempted to grow () to 134217728 bytes, past the 64M B limit.

After analysis, [conn312773] Connect the previous query is all statistical analysis class query, followed by the development department to confirm.
They think they have a problem with the following query.

Less commonly used here is: item:{$push: "$ $ROOT"}
This function is this: the query to the data, the list of all the data in $push way to return to the item,
The advantage of this is that in a page, there are summary data, followed by a corresponding detail.
The disadvantage is that if the detail value is too large, it triggers the bug above. In the official bug description, the version 2.4.6 is resolved. But in 2.6.8, we still
It is a reason to encounter, and may be rarely used.


Db.getcollection (' pinfo '). Aggregate ([
{
$match: {mid:86}
},
{
$group: {
_id: {PID: "$PID"},
Sumcount: {$sum: 1},
item:{$push: "$ $ROOT"}
}
}
])


Our solution:
Change the value of $push in item from total record to only return a few fields (as little as possible, and do not return subdocuments and arrays, because these two types are difficult to foresee how large)
The query condition is optimized to the minimum, and only a small amount of data is queried at a time. Thus reducing the amount of data returned.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.