swap on davidchua https://dchua.com/tags/swap/ Recent content in swap on davidchua Hugo -- gohugo.io en-us Tue, 10 Dec 2013 00:00:00 +0000 Mongodb caveats; you need swap space https://dchua.com/posts/2013-12-10-mongodb-caveats-you-need-swap-space/ Tue, 10 Dec 2013 00:00:00 +0000 https://dchua.com/posts/2013-12-10-mongodb-caveats-you-need-swap-space/ So I was helping out a friend figure out why his server keeps crashing and timing out. Having moved his mongodb query code out into its own controller and setup an onload AJAX call, I subsequently started to look deep into the mongodb logs. I noticed this appearing: Tue Dec 10 15:20:14.043 [conn3] getmore bleah.data query: { $where: " Doing a google, I came across this article. Apparently, mongodb dies when it runs out of memory.