Reputation: 4606
I have been uploading photos with reports to mongodb. I reached the database size limit. How do I increase the size of the database?
db.stats()
{
"db" : "fieldops",
"collections" : 6,
"objects" : 20454,
"avgObjSize" : 890464.9997066589,
"dataSize" : 18213571104,
"storageSize" : 18432802736,
"numExtents" : 52,
"indexes" : 4,
"indexSize" : 809424,
"fileSize" : 21398290432,
"nsSizeMB" : 16,
"extentFreeList" : {
"num" : 0,
"totalSize" : 0
},
"dataFileVersion" : {
"major" : 4,
"minor" : 22
},
"ok" : 1
}
Also, as an aside. I have 12,000 pics right now that are uploaded every month. I read that the mongodb data file limit is 16,000. I couldn't find what the definition of data file is in the glossary. Is that referring to the buffered pictures that I uploaded to the database? So, once that happens I have to set up a separate server with a shard? Or can I create a shard on the same machine?
Thanks in advance.
Update
The error I get is MongoError: new file allocation failure
. When I upload data with only tiny photos it uploads fine. On the server there was originally 14.8GB being used and 24.7GB total space. I've since increased the total space to double that.
Update 2
It had something to do with the database not being able to see the virtual memory. So, it wasn't a true expansion. Not sure what that means exactly but that is what the Sys Admin was telling me. :-/
Upvotes: 1
Views: 452
Reputation: 2080
Your mongodb server will claim more disk space on its own, if it's available—no need to do anything about it. As for the file limit of 16KB, that's per document in your collection. You can easily have collections of millions of documents or more.
Upvotes: 1