2

We have a service will collect data and call api to save to a mongodb's collection name alldata

And the problem is ,it keeps write data frequently,then the mongo will shutdown (I found on internet said the collection limit is 16mb)

So we have to delete the old data by hour
But I want to keep the old data at least one week
How to design this ??

should we use many collections to save?? If we use many collections,how to query many of them??
Or should we back up ?

I heard that mongodb is appropriate to bigdata,but I don't know how people usually use it ?
Please give me some advice Thank you.

closed as unclear what you're asking by Max Vernon, Tom V, Philᵀᴹ, Derek Downey, billinkc Dec 17 '15 at 15:08

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

2

The limit is not on the collection size, but on the document size. There are ways that you can store the document of a higher size.

Having very large Documents will surely affect the performance of the MongoDB. You can surely split these documents into multiple documents in the same Collection.

For example, You can divide the Documents to be stored Date wise, I mean, if you were writing all the data related to some X constraint into a document, then split it into X Constraint, Date 1 as one document, X Constraint, Date 2 into a different document. You can split in any logical way you feel is right for your Database design.

Or if you Document is very granular in nature and can't be split, then you have 3 options
1. Use Mongo's GRID FS
2. a relational approach to store the part of the data in a different Collection
3. Depending on the number of reads, number of writes and the size of the Document, choose the best possible NoSql Solution.

If you need a more specific answer, please update the question with relevant details.

  • +1 for clarification of limit on document not collection. – Derek Downey Dec 17 '15 at 13:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.