title: Mongo service crashed. Need to find reason of crash
body: <p>Today morning I found the following error with mongo, on my server.</p>
  
  <pre><code>*** System restart required ***
  You have mail.
  ubuntu@ip-xxx-xx-xx-xx:~$ mongo
  MongoDB shell version: 2.4.9
  connecting to: test
  Wed Nov 25 05:18:51.381 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
  exception: connect failed
  </code></pre>
  
  <p>It crashed my website. How can I find what stopped mongo service? Do mongo have logs for this? Where can I find them? Also How to make sure if if mongodb is crashed then it restart service as well?</p>
  
  <p>I restarted mongodb service and website started working again.</p>
  
  <p>Output of ps -ef | grep mongod:</p>
  
  <pre><code>mongodb   14756      1  0 05:20 ?        00:00:14 /usr/bin/mongod --config /etc/mongodb.conf
  ubuntu    36865  14123  0 06:18 pts/2    00:00:00 grep --color=auto mongod
  </code></pre>