Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
bson.errors.InvalidDocument
InvalidDocument: BSON document too large (30194986 bytes) - the connected server supports BSON document sizes up to 16777216 bytes.

This is the exception I get when I run mongodb query on count.
What is the cause of this problem and how to resolve it?
Posted
Updated 29-Nov-12 0:59am
v2

1 solution

Your BSON document exceed the limit being supported as the error message clearly states.
See MongoDB Limits and Thresholds[^] for documentation about the limit.

The way to solve this is making your document smaller.
 
Share this answer
 
Comments
sshl 30-Nov-12 0:14am    
the above exception occurs when i pass parameters to query and not when i dont pass parameters to query.when i don't pass parameters it works fine.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900