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