我在覆盆子pi 3b上运行mongodb 2.4.10。几天后它开始随机崩溃,没有--journal就开始了。我创建了新数据库,但它又开始崩溃了。每次崩溃后都需要--repair。
我注意到它在尝试排序后崩溃了
User.find({}).limit(10).sort({
messages: -1
}).exec(function(err, docs) {
...
});
但它与find
一起罚款User.find({}, function(err, docs) {
...
});
这里是mongodb的完整日志
Sat Feb 11 05:56:02.356
Sat Feb 11 05:56:02.356 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
Sat Feb 11 05:56:02.356
Sat Feb 11 05:56:02.386 [initandlisten] MongoDB starting : pid=754 port=27017 dbpath=db 32-bit host=raspberrypi
Sat Feb 11 05:56:02.386 [initandlisten]
Sat Feb 11 05:56:02.386 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
Sat Feb 11 05:56:02.386 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
Sat Feb 11 05:56:02.386 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off.
Sat Feb 11 05:56:02.386 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
Sat Feb 11 05:56:02.386 [initandlisten]
Sat Feb 11 05:56:02.386 [initandlisten] db version v2.4.10
Sat Feb 11 05:56:02.386 [initandlisten] git version: nogitversion
Sat Feb 11 05:56:02.386 [initandlisten] build info: Linux bm-wb-03 3.19.0-trunk-armmp #1 SMP Debian 3.19.1-1~exp1+plugwash1 (2015-03-28) armv7l BOOST_LIB_VERSION=1_55
Sat Feb 11 05:56:02.386 [initandlisten] allocator: system
Sat Feb 11 05:56:02.386 [initandlisten] options: { dbpath: "db" }
Sat Feb 11 05:56:02.441 [websvr] admin web console waiting for connections on port 28017
Sat Feb 11 05:56:02.442 [initandlisten] waiting for connections on port 27017
Sat Feb 11 05:56:03.724 [initandlisten] connection accepted from 127.0.0.1:43800 #1 (1 connection now open)
Sat Feb 11 05:56:39.087 [conn1] assertion 13097 Unsupported projection option: messages ns:test.users query:{ id: 378418036.0 }
Sat Feb 11 05:56:53.794 [conn1] end connection 127.0.0.1:43800 (0 connections now open)
Sat Feb 11 05:57:01.512 [initandlisten] connection accepted from 127.0.0.1:43960 #2 (1 connection now open)
Sat Feb 11 05:57:01.786 [initandlisten] connection accepted from 127.0.0.1:43962 #3 (2 connections now open)
Sat Feb 11 05:57:01.787 [initandlisten] connection accepted from 127.0.0.1:43964 #4 (3 connections now open)
Sat Feb 11 05:57:01.787 [initandlisten] connection accepted from 127.0.0.1:43966 #5 (4 connections now open)
Sat Feb 11 05:57:08.329 [initandlisten] connection accepted from 127.0.0.1:43974 #6 (5 connections now open)
Sat Feb 11 05:57:09.474 Invalid access at address: 0x6b70f6c7 from thread: conn3
Sat Feb 11 05:57:09.474 Got signal: 7 (Bus error).
Sat Feb 11 05:57:09.479 Backtrace:
0x664160 0x16e370 0x16e6c0 0x766031a0 0x3bfa40 0x433a5c 0x430844 0x431428 0x3c5dc8 0x3c81a4 0x182474 0x64aa08
mongod(_ZN5mongo15printStackTraceERSo+0x1c) [0x664160]
mongod(_ZN5mongo10abruptQuitEi+0x2a0) [0x16e370]
mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP9siginfo_tPv+0x1fc) [0x16e6c0]
/lib/arm-linux-gnueabihf/libc.so.6(__default_rt_sa_restorer_v2+0) [0x766031a0]
mongod(_ZN5mongo22BSONElementManipulator9SetNumberEd+0x98) [0x3bfa40]
mongod(_ZN5mongo11ModSetState16applyModsInPlaceEb+0x3d4) [0x433a5c]
mongod(_ZN5mongo14_updateObjectsEbPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEPNS_11RemoveSaverEbRKNS_24QueryPlanSelectionPolicyEb+0x2788) [0x430844]
mongod(_ZN5mongo13updateObjectsEPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEbRKNS_24QueryPlanSelectionPolicyE+0x70) [0x431428]
mongod(_ZN5mongo14receivedUpdateERNS_7MessageERNS_5CurOpE+0x35c) [0x3c5dc8]
mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x14b0) [0x3c81a4]
mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x9c) [0x182474]
mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x420) [0x64aa08]