max bson size in pymongo

70 views
Skip to first unread message

gelin yan

unread,
Nov 2, 2012, 1:47:15 PM11/2/12
to mongod...@googlegroups.com
Hi All

      I just noticed there is a field named __max_bson_size in connection.py. The value is 4*1024*1024.. As We know after 1.8.x, the max bson size is 16 MB. So what happen if I store a bson object whose size is bigger than 4MB with pymongo?


Regards

gelin yan

Bernie Hackett

unread,
Nov 2, 2012, 1:51:36 PM11/2/12
to mongod...@googlegroups.com
That field is only used if the 'ismaster' command does not return 'maxBsonObjectSize'. Basically it's only used with MongoDB versions before 1.8. Assuming you are using a MongoDB version of 1.8 or newer, you can store documents up to 16MB in size with PyMongo just fine.



gelin yan

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb

gelin yan

unread,
Nov 6, 2012, 10:56:57 AM11/6/12
to mongod...@googlegroups.com


在 2012年11月3日星期六UTC+8上午1时51分47秒,Bernie Hackett写道:
That field is only used if the 'ismaster' command does not return 'maxBsonObjectSize'. Basically it's only used with MongoDB versions before 1.8. Assuming you are using a MongoDB version of 1.8 or newer, you can store documents up to 16MB in size with PyMongo just fine.


On Fri, Nov 2, 2012 at 10:47 AM, gelin yan <geli...@gmail.com> wrote:
Hi All

      I just noticed there is a field named __max_bson_size in connection.py. The value is 4*1024*1024.. As We know after 1.8.x, the max bson size is 16 MB. So what happen if I store a bson object whose size is bigger than 4MB with pymongo?


Regards

gelin yan

--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com

Hi Bernie

      Thanks for your answer, I have verified that. BTW, Does mongodb plan to support larger size like 32 MB ?

Regards

gelin yan

Bernie Hackett

unread,
Nov 6, 2012, 11:17:16 AM11/6/12
to mongod...@googlegroups.com
There's a ticket you can vote on here:



Reply all
Reply to author
Forward
0 new messages