I'm running a Sandbox database for an amateur project for a contest. Its the first time I do this, and I made the mistake of waiting until everything was done before uploading to my database all the records I will analyze via MapReduce operations.
The problem: I think I might have fucked something up, because I got it all figured, but when I barely hit half my maximum allowed size (which is 500MB, and I have a 320MB collection and a 7KB one), I started getting "Quota Exceeded" errors, code 12501. What is this?
Please help me, this is due tomorrow
Stats: http://i.imgur.com/r58nIgg.png fileSize seems to be almost 500MB, but it has been that way for a while and it still uploaded, I figured that was some kind of allocated space. How does it make sense that I cant use the whole disk space they claim to offer for free?
MongoDB preallocates data files and may preallocate journal files. You can reduce this space by disabling journal files, although this is not recommended on production systems.
You can reduce your database file size by running the compact command:
db.runCommand ( { compact: '<collection>' } )
You can disable the journal files as follow:
In the MongoDB configuration file add the following line:
smallfiles=true
Then shut down MongoDB and remove the journal files using the following steps:
sudo cp -p /etc/mongodb.conf /etc/mongodb.conf.orig
sudo vi /etc/mongodb.conf
sudo service mongodb stop
sudo rm -rf /var/lib/mongodb/journal/*
sudo service mongodb start
All the files in /var/lib/mongodb/journal/ are recreated when mongodb starts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With