Mongolab “quota exceeded” although I barely hit half my maximum allowed size

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Mongolab “quota exceeded” although I barely hit half my maximum allowed size



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?




1 Answer
1



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.





Total database size seems to be 320MB though, could this still be? And how do I do that? Thanks
– CyborgFish
Apr 17 '15 at 21:44





Did you see my edit? I will try this regardless, though unfortunately I have very little experience with mongodb (learned webdev from exclusively from this contest, on a hurry) and I dont know how. Should I like download MongoDB in order to connect to my database with the shell? and where is that config file? sorry. EDIT: I only need the files for a mapreduce operation so I'm actually considering doing it locally then cloning, is that feasible?
– CyborgFish
Apr 17 '15 at 21:55






Yes doing it locally then cloning is fesaible
– Jaco
Apr 17 '15 at 22:07





Honestly, would you recommend that over your fix? also, how do I even do what you said?
– CyborgFish
Apr 17 '15 at 22:11






Looking at your update mentioning the file size of 500MB you might be better off to compact your database; db.runCommand ( compact: '<collection>' )
– Jaco
Apr 17 '15 at 22:13






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered