让 mongoDB 在 OpenVZ 上运行

Get mongoDB working on OpenVZ without out of memory problem
check virtual memory limit

 

ulimit -a | egrep virtual\|open
open files (-n) 1024
virtual memory (kbytes, -v) unlimited
 

 

set virtual memory limit to 1.2GB or 1.4GB (total memory 2GB)

 


ulimit -v 1200000
 

你可能感兴趣的:(mongodb)