[SERVER-15231] assertion 17144 Runner error: Overflow sort stage buffered data usage of 33554584 bytes exceeds internal limit of 33554432 bytes Created: 11/Sep/14  Updated: 18/Sep/14  Resolved: 12/Sep/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.1
Fix Version/s: None

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

Participants:

 Description   

we're having this issue with 2.6.1. how can we fix this problem?

2014-09-11T15:48:36.726-0700 [conn11525]  ntoskip:0 ntoreturn:-1
2014-09-11T15:48:36.726-0700 [conn11525] query rcfgmongo.CONFIG_312e312e312e32 query: { query: { SCOPE: 2021 }, orderby: { OFFSET: 1 } } keyUpdates:0 exception: Runner error: Overflow sort stage buffered data usage of 33554584 bytes exceeds internal limit of 33554432 bytes code:17144 numYields:4 locks(micros) r:4170258 reslen:158 2620ms
2014-09-11T15:48:37.505-0700 [conn11533] assertion 17144 Runner error: Overflow sort stage buffered data usage of 33554584 bytes exceeds internal limit of 33554432 bytes ns:rcfgmongo.CONFIG_312e312e312e32 query:{ query: { SCOPE: 2021 }, orderby: { OFFSET: 1 } }

rcfgmongo:PRIMARY> db.CONFIG_312e312e312e32.getIndexes();
[
        {
                "v" : 1,
                "key" : {
                        "_id" : 1
                },
                "name" : "_id_",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32"
        },
        {
                "v" : 1,
                "key" : {
                        "SCOPE" : 1,
                        "KEY" : 1
                },
                "name" : "SCOPE_1_KEY_1",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32",
                "background" : true
        },
        {
                "v" : 1,
                "key" : {
                        "KEY" : 1
                },
                "name" : "KEY_1",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32",
                "background" : true
        },
        {
                "v" : 1,
                "key" : {
                        "CTX" : 1
                },
                "name" : "CTX_1",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32",
                "background" : true
        },
        {
                "v" : 1,
                "unique" : true,
                "key" : {
                        "UID" : 1
                },
                "name" : "UID_1",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32",
                "background" : true
        },
        {
                "v" : 1,
                "key" : {
                        "SCOPE" : 1
                },
                "name" : "SCOPE_1",
                "ns" : "rcfgmongo.CONFIG_312e312e312e32",
                "OFFSET" : -1
        }
]
rcfgmongo:PRIMARY> 



 Comments   
Comment by Ramon Fernandez Marina [ 18/Sep/14 ]

nammo, the first is an index on multiple fields, while the second is an index on one field (SCOPE) with some additional options (that are ignored in this case). Please see the documentation on ensureIndex for further information.

Regards,
Ramón.

Comment by Nam Tang [ 12/Sep/14 ]

Hello,

Thank for prompt response. Can you explain why is the different between
these two indexes?

ensureIndex({SCOPE : 1, OFFSET : -1})

ensureIndex({SCOPE : 1}, {OFFSET : -1})

Thx,
Nam.

Comment by Ramon Fernandez Marina [ 12/Sep/14 ]

nammo, upon further inspection of your indexes it seems you wanted to create an index as

ensureIndex({SCOPE : 1, OFFSET : -1})

but probably typed

ensureIndex({SCOPE : 1}, {OFFSET : -1})

which explains the error message in the description (as there's no index on SCOPE to provide the sort for your query), and also the extraneous "OFFSET" : -1 in the last index you posted above.

Regards,
Ramón.

Comment by Ramon Fernandez Marina [ 12/Sep/14 ]

nammo, it seems you're requesting a sort that can't be provided by an index, and the sort is > 32MB so the server can't answer the query. You may want to create an index on OFFSET to address this issue.

Regards,
Ramón.

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