title: MongoDB memory consumption - it keeps rising
body: <p>I run a mongodb server in a EC2 instance on AWS. For a while it ran flawlessly, nevery spiking above 50% of memory usage.</p>
  <p>Suddenly, the behaviour changed to an ever increasing curve, it never goes significantly down, it keeps growing througout the day, until it reaches a peak (sometimes it is 100%, sometimes 90 or 80) and suddenly drops to 50% (perhaps some Hypervisor activity here?).</p>
  <p>This behavior is NOT, in any way, compatible with the usage behavior of the application server this database is serving. Below is a graph comparing incoming requests x db memory usage.</p>
  <p><a href="https://i.stack.imgur.com/CbZoZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CbZoZ.png" alt="enter image description here" /></a></p>
  <p>What are the things I should be looking into to diagnose this memory issue? I already looked at the amount of open connections at any given time, and it is very low (&lt;20), so I don't think it could be that. Any other ideas?</p>
  <p>This issue doesn't seem to impact database performance, but I can't run any maintenance jobs (like archiving and backup) with memory that high - I had cases in which the database crashed.</p>