Mongo 16 MB LImitatiion

BSON Document Size is 16 MB, but i normally search using find method of mongotemplate with record of 2 year, then i get error of 16 MB limitation. Example search from 1 jan 2019 to 31 Dec 2020, then i got error

but if i search individual, then got the result like 1 jan 2019 to 31 Dec 2019 , this give me result. (5.5 lakh record it fetch successfully within 2 min.)

When search with 2 year, then i got 16 mb limitation error

Note : This is simple JSON like Employee collection having employee no , date etc.

i am not talking about GridFS API

Please help me in this.

Hi @Kunal_Talwadiya,

Can you share the code and query you are performing?

Its possible that you try to manipulate all data into a single document and cross 16mb .


1 Like