我的环境:版本:2.4.4,操作系统:Linux 64位,组件:复制集+分片
当我使用 连接到我的数据库时mongos
,出现一个错误:
mongos> db.test.find().limit(500).sort({TIME:-1})
error: {
"$err" : "BSONObj size: 268823536 (0xF0EB0510) is invalid. Size must be between 0 and 16793600(16MB) First element: \u001f: ?type=38",
"code" : 10334
}
但是,当我按另一个字段排序时,没有错误:
mongos> db.test.find().limit(500).sort({C_ID:-1})
{ "_id" : "13744759060340298528dbaaa", "C_ID" : "999", "TIME" : ISODate("2013-07-22T06:51:46.034Z"), "SE" : "0", "AREA" : "a21", "CT1" : "1", "CT2" : "1", "S_PT" : 11, "EN_N" : "Test system", "T_ID" : "3946", "EN_T" : "2", "MSG" : "for test64", "EVENT" : "test event39", "S_IP" : "1.2.4.174", "URL" : "URL536" }
......
所以我连接到其中一个分片:
sh0:PRIMARY> db.test.find().limit(500).sort({TIME:-1})
{ "_id" : "13744759061349b294b309aaa", "C_ID" : "373", "TIME" : ISODate("2013-07-22T06:51:46.134Z"), "SE" : "0", "AREA" : "a2", "CT1" : "1", "CT2" : "8", "S_PT" : 8, "EN_N" : "Test system", "T_ID" : "2654", "EN_T" : "1", "MSG" : "for test0", "EVENT" : "test event38", "S_IP" : "1.2.4.193", "URL" : "URL829" }
...
有人给我一个想法吗?
感谢您的关注!