We recently moved to a manual install of Rocketchat which uses MongoDB for it’s database and I am completely new to MongoDB.
After running for a weeks without issue today it appears the kernel OOM killer went to work on MongoDB and killed the main server process. Normally when things like this happen, my assumption is that:
- there may be a query design flaw, missing index or some other underlying issue causing certain processes to stall or consume more memory than normal.
- there may also be some server or db configuration that needs tuning to limit memory consumption
It would also be nice if the Mongo server restarted itself after such events but that’s another story.
As an absolute beginner, can someone please help guide me in getting to the root of what happened here? I see lots of
"msg":"Slow query" and
"msg":"serverStatus was very slow" messages in the logs among other things. Please let me know what further info I can provide here that would be of use debugging this issue.