Ruby on Rails Mongodb Mongoid virtual memory usage

211 Views Asked by At

I use Ruby on Rails application with MongoDB and Mongoid to process some data. During a run time application executes millions of queries and I keep terminal window where rails server is running open to watch processes. After program finish running consumption of memory using by terminal consuming 13GB. If I start program to run again - consumption of memory will keep to grow and at the end it will be 26GB. I tried to do the same in production without using terminal and free virtual memory dropped almost to 0. It coming back to normal after closing terminal in development or rebooting linux instance in production. I am guessing that this memory used by MongoDB. My question is - How to make application or MongoDB to reset memory automatically each time after program finish to run without closing terminal or rebooting linux instance? Or how to set MongoDB to do not use so much memory?

0

There are 0 best solutions below