What does it mean?

2017-04-28T04:37:53.126+0000 D - [conn1571] thread over memory limit, cleaning up, current: 67k 2017-04-28T04:37:53.911+0000 D - [conn1585] thread over memory limit, cleaning up, current: 79k

Should I make something to solve it? If I increas server memory will it help?

1 Answer 1


This is from source code:

// If many clients are used, the per-thread caches become smaller and chances of
// rebalancing of free space during critical sections increases. In such situations,
// it is better to release memory when it is likely the thread will be blocked for
// a long time.

And when numOpenSessions is over 40 and threadCacheSizeBytes (GetThreadCacheSize()) goes under 0x10000, system frees memory.

So, to "prevent" this, you should have less (concurrent) open sessions OR more (cache) memory. You can define (wiredTiger) bigger (than default) cache size, with current memory. But, yes, it's better give more memory than define bigger cache size, because when mongodb have more memory, cache size is automatically bigger.

  • I upgraded server twice. Server had 16G. Now it have 30G. I see same messages.
    – Oleg T.
    Commented Apr 28, 2017 at 10:44
  • db.serverStatus().storageEngine MongoDB server version: 3.4.3 > db.serverStatus().storageEngine { "name" : "mmapv1", "supportsCommittedReads" : false, "readOnly" : false, "persistent" : true }
    – Oleg T.
    Commented Apr 28, 2017 at 11:06
  • What db.serverStatus().connections says. Remember that every connection eat 1MB memory.
    – JJussi
    Commented Apr 28, 2017 at 11:52
  • > db.serverStatus().connections { "current" : 145, "available" : 51055, "totalCreated" : 200 } [ec2-user@ip-172-31-18-124 ~]$ free -m total used free shared buffers cached Mem: 30667 20658 10008 0 150 19187 -/+ buffers/cache: 1320 29347
    – Oleg T.
    Commented Apr 28, 2017 at 15:50
  • Is there good reason to use mmapv1 and not wiredTiger? Would it be possible to you change it?
    – JJussi
    Commented Apr 29, 2017 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.