mongodb User Exception 10085:can't map file memory

某IDC机房换电源,重启mongodb起不来啦。真是年末的一个玩笑。 用的是centos server但版本都比较低,是64位的。奇怪的事居然报了“if you're using 32-bits, then you probably need to upgrade to 64”呵呵!

Sat Dec 29 19:06:16 User Exception 10085:can't map file memory
Sat Dec 29 19:06:16    Caught Assertion in runQuery ns:xxxxxxx.pages userassert:can't map file memory
Sat Dec 29 19:06:16   ntoskip:0 ntoreturn:-1
Sat Dec 29 19:06:16   query:{ slug: "asserts/logo" }
Sat Dec 29 19:06:16 query xxxxxxx.pages ntoreturn:1 exception  0ms
Sat Dec 29 19:06:20 connection accepted from 127.0.0.1:34035 #4
  mmap() failed for /xxxxxx/data/xxxxxxx.ns len:16777216 errno:12 Cannot allocate memory
     mmap failed with out of memory, if you're using 32-bits, then you probably need to upgrade to 64

mongod --version
db version v1.4.3, pdfile version 4.5
Sat Dec 29 20:50:18 git version: 47ffbdfd53f46edeb6ff54bbb734783db7abc8ca

查了官方文档,发现mongodb的版本太低了引起的。

升级到了mongodb-linux-x86_64-2.2.2 一切正常了

Comments