I recently upgraded to mongoid5 and experienced since then a high frequency of MongoDB server dying out of memory or being OOM Killed.
I digged into the charts at MMS and saw a huge number of open cursors, slowly timeouting, causing a 10 times increase in memory usage:
I haven't investigate more yet to find which query is causing this, and as it's not possible to list cusors yet (SERVER-3090) but I'm pretty sure this comes from the mongo driver. The left side of the chart was Mongoid 4 with Moped.
I'll be happy to dig in to this more to help you but I wanted to post first so maybe you can tell me you're already aware or how I can help you with this.
Thanks ! and keep up the good work ☺
- is related to
-
MONGOID-4700 Use limit 1 instead of -1
- Closed
-
MONGOID-4192 Add limit of 1 to Model#first and Model#last to avoid leaving cursors open on the server
- Closed