mongodb错误tcmalloc: large alloc out of memory, printing stack and exiting解决办法
最近Mongodb会经常突然挂掉,检查日志发现如下的错误:
tcmalloc:largealloc2061584302080bytes==(nil)@ TueNov2617:45:04.539outofmemory,printingstackandexiting: 0xdddd810x6cfb4e0x121021d0xafcc1f0xaf815f0xaf8d1d0xaf8e0f0xaf52ae0xaf53c90xb1eb110x8ab6a20x8d78ca0x8d951d0x8daa720xa809700xa8523c0x9f90790x9fa5a30x6e8b880xdca34e ./mongod(_ZN5mongo15printStackTraceERSo+0x21)[0xdddd81] ./mongod(_ZN5mongo14my_new_handlerEv+0x3e)[0x6cfb4e] ./mongod(_Znwm+0x6d)[0x121021d] ./mongod(_ZNSt6vectorIN5mongo18DocumentSourceSort9KeyAndDocESaIS2_EE7reserveEm+0x6f)[0xafcc1f] ./mongod(_ZN5mongo18DocumentSourceSort12populateTopKEv+0x6f)[0xaf815f] ./mongod(_ZN5mongo18DocumentSourceSort8populateEv+0x2d)[0xaf8d1d] ./mongod(_ZN5mongo18DocumentSourceSort3eofEv+0xf)[0xaf8e0f] ./mongod(_ZN5mongo18DocumentSourceSkip7skipperEv+0x6e)[0xaf52ae] ./mongod(_ZN5mongo18DocumentSourceSkip3eofEv+0x9)[0xaf53c9] ./mongod(_ZN5mongo8Pipeline3runERNS_14BSONObjBuilderERSs+0x1b1)[0xb1eb11] ./mongod(_ZN5mongo15PipelineCommand3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x132)[0x8ab6a2] ./mongod(_ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb+0x3a)[0x8d78ca] ./mongod(_ZN5mongo7Command11execCommandEPS0_RNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb+0x71d)[0x8d951d] ./mongod(_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x5f2)[0x8daa72] ./mongod(_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi+0x40)[0xa80970] ./mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0xd7c)[0xa8523c] ./mongod()[0x9f9079] ./mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x383)[0x9fa5a3] ./mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x98)[0x6e8b88] ./mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x42e)[0xdca34e]