I use this command to hang up a mongodb in background and set dbpath to mount:
sudo mongod --dbpath /mnt/volume-nyc1-04/mongodata2 --fork --logpath /var/log/mongod.log --bind_ip 127.0.0.1
this works well for mongodata, but for mongodata2 whenever i type into command line the whole server just keep crashing and i have to log into console and power on.
This mongodata2 is a large db (300GB) with large collection (3billion rows). I am wondering what could cause the server crashing?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Why are you running mongodb as root? What do you mean by “crashing”? Did you check the logs?
If the server reboots, meaning kernel crash, then you should find some information in /var/log/kern.log https://help.ubuntu.com/community/DebuggingSystemCrash#log_files
But you’re using MongoDB incorrect. You shouldn’t run it as root - never. And if you run multiple MongoDBs at the same time, you need to set different PID, dataPath, listen address, etc.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.