Khi dịch vụ Mongodb bị sập (có thể do bộ nhớ), các bước khởi động tự động:
Edit your mongod service:
sudo nano /lib/systemd/system/mongod.serviceAdd
Restart=alwaysunderserviceReload systemctl daemon:
sudo systemctl daemon-reload
Nguồn https://stackoverflow.com/questions/49768232/how-to-auto-restart-mongodb-in-ubuntu-16-04