- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
使用 MongoDB 的 10gen C# 驱动程序,在生产中每隔一段时间我就会看到这个错误:
System.IO.FileFormatException:在 C:\work\10gen\mongodb\mongo-csharp-driver\Bson\IO\BsonBinaryReader.cs 中,大小大于 MongoDB.Bson.IO.BsonBinaryReader.ReadSize() 处的 MaxDocumentSize:第556行
有没有办法使 MaxDocumentSize 变大以防止出现此错误?
我的文档大小不可能接近 16MB,我也没有存储任何文件。这是一个示例文档,当我将其保存在记事本中时,它看起来只有 13KB。
{
"Address": "1080 DUNLAP ORPHANAGE RD",
"Baths": null,
"Beds": null,
"Broker": "Crye-Leike, Inc., REALTORS |(901)840-1181",
"City": "Unincorporated",
"Coordinates": {
"Latitude": 35.414949,
"Longitude": -89.676481
},
"CreateDate": "Sun, 03 Apr 2011 19:40:11 GMT -04:00",
"Description": "",
"ExteriorConstruction": "Aluminum/Steel Siding, Double Pane Window(s), Vinyl Siding, Conventional Foundation",
"ExteriorFeatures": "",
"FireplaceFeatures": "In Den/Great Room, Masonry, Wood Stove Insert",
"HasGarage": true,
"HeatingFeatures": "Ceiling Heat, Central, Gas, Wood Stove",
"HouseSize": null,
"InteriorFeatures": "Double Vanity Bath, Split Bedroom Plan, BEDROOM 2: Carpet, Level 2, Walk-In Closet; BEDROOM 3: Carpet, Level 2, Walk-In Closet; BEDROOM 4: Carpet, Level 2, Private Half Bath, Walk-In Closet; Part Carpet, Part Hardwood, Sprayed Ceiling, Tile Floor, Wood Laminate Floors, Attic Access, Cable Available, Cable Wired, Central Vac, Mud Room, Walk-In Attic, Walk-In Closet(s), Breakfast Bar, Eat-In Kitchen, Pantry, Separate Dining Room, Washer/Dryer Connections, MASTER BATH: Carpet, Double Sinks, Dressing Area, Tile Floor; Gas Water Heater, Entry Hall",
"IsActive": true,
"ListingFeatures": [
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Status: ACTIVE"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "County: Tipton"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Approximately 10 acre(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "2 total full bath(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "2 total half bath(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "9 total rooms"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "2 stories"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Type: General Residential"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Master Bedroom is Carpet, Full Bath, Level 1, Walk-In Closet"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Basement is Partial, Unfinished"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Pool features: Above Ground"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "2 covered parking space(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Yes car garage(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Attached parking"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Cooling features: 220 Wiring, Dual System,Cooling"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Inclusions: Cooktop, Dishwasher, Gas Cooking, Microwave, Refrigerator, Satellite Dish, Self Cleaning Oven"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Lot features: Chain Fenced, Landscaped, Level, Some Trees, Wooded"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Lot size is between 10 and 20 acres"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Utilities present: Public Water, Septic Tank"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Swimming pool(s)"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Basement"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Den"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Laundry room"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Hardwood floors"
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"Name": "Parking features: Driveway/Pad, Garage Door Opener(s), Storage Room(s), Workshop(s)"
}
],
"ListingPhotos": [
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m0x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m0t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m1x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m1t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m2x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m2t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m3x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m3t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m4x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m4t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m5x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m5t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m6x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m6t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m7x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m7t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m8x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m8t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m9x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m9t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m10x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v02/l7d100943-m10t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
},
{
"_id": null,
"CreateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"UpdateDate": "Sun, 03 Apr 2011 19:40:04 GMT -04:00",
"OriginalPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m11x.jpg",
"OriginalPhoto": null,
"OriginalPhotoUpdateDate": null,
"ThumbnailPhotoUrl": "http://p.rdcpix.com/v01/l7d100943-m11t.jpg",
"ThumbnailPhoto": null,
"ThumbnailPhotoUpdateDate": null
}
],
"ListingPriceHistories": null,
"ListingSalesHistories": [],
"ListingTaxHistories": [],
"LotSize": null,
"MlsCreateDate": "Sat, 15 Jan 2011 19:40:04 GMT -05:00",
"MlsId": "3215435",
"MlsRefreshDate": "Sun, 03 Apr 2011 19:31:04 GMT -04:00",
"Neighborhood": "Not Available",
"Price": 290000,
"PropertyType": "Single Family Home",
"RealtorUrl": "http://realtor.com/realestateandhomes-detail/1080-dunlap-orphanage-rd_unincorporated_tn_38011_1124667517",
"Roofing": "Composition Shingles",
"State": "TN",
"Stories": 2,
"Style": "Traditional",
"UpdateDate": "Sun, 03 Apr 2011 19:40:11 GMT -04:00",
"YearBuilt": 1987,
"ZipCode": "38011",
"_id": {
"$oid": "4d99055b1b9ba917bcef9443"
}
}
最佳答案
通常,如果您的文档太大,您可能会在将它们写入数据库时遇到此错误,而不是在读回它们时遇到此错误。
能否提供更多信息:
如果您愿意自己构建驱动程序,您可以在抛出异常的行上设置一个断点并确定文档的大小和最大文档大小并报告这些数字。
谢谢。
关于mongodb - 大小大于 MaxDocumentSize,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6133470/
我已经在 kubernetes 中部署了一个 3 pod mongodb statefulset,并且我正在尝试使用新的 mongodb+srv 连接字符串 (mongodb 3.6) 连接到具有 S
我已经创建了 MongoDB Atlas 帐户,并尝试连接。但出现以下错误。 MongoDB 连接错误 MongoNetworkError: 首次连接时无法连接到服务器 [cluster0-shard
我正在使用 Node-WebKit 创建桌面应用程序。该应用程序基本上是创建文档(员工日常工作的详细信息),任何注册用户都可以对这些文档发表评论。我正在创建的文档将被分成几个部分。用户将对特定部分发表
我正在尝试使用官方网站上的安装程序在我的本地机器上安装 mongo DB。但是我不断收到这条消息,有人可以帮忙吗? 我试过提供的解决方案 here但没有帮助。 最佳答案 我建议执行以下操作: 按 Wi
我对 MongoDB 和 MongoDB Compass 非常陌生。 我的客户集合中有大约 1000 条记录。如何通过 MongoDB 指南针一次删除所有记录。 非常感谢, 最佳答案 您可以使用 Mo
当我尝试在我的 Ubuntu 机器中安装 mongodb 时,apt-get 会显示以下选项 mongodb mongodb-clients mongodb-dev mongodb-server 谁能
如何将 Robomongo(或任何其他 mongodb 客户端)连接到由本地 Meteor 应用程序创建的 mongodb 实例? 最佳答案 确保 Meteor 正在本地主机上运行。打开终端窗口并运行
我需要在 MongoDB 中生成一个简单的频率表。假设我在名为 books 的集合中有以下文档。 { "_id": 1, genre: [ "Fantasy", "Crime"
我如何在 mongos mapreduce 中指定一个条件,就像我们在 mongos group 函数中所做的那样。 我的数据是这样的 {lid:1000, age:23}, {lid:3000, a
我的 mongodb 数据库文档中有几个 ID。我需要通过脚本在这些 ID 上创建索引,这样我就不必一次又一次地运行 ensureIndex 命令。 db.getCollection("element
在我的数据库中,每个包含项目的文档中都有一个嵌套的元素数组,格式如下: elements:[ { "elem_id": 12, items: [ {"i_id": 1
我正在构建一个应用程序,其中用户可以位于不同的时区,并且我运行的查询对他们的时区很敏感。 我遇到的问题是 MongoDB 似乎在查询时忽略了时区! 这是日期字段“2019-09-29T23:52:13
我正在研究使用 mongodb 进行分片,我有以下结构: 1 个 Mongod 到我的 ConfigServer,在 ReplicaSet 中只有 1 个成员 2 个分片,每个分片在 ReplicaS
我正在尝试获取一个 mongoDB 对象,例如 Friend1 包含另一个 mongoDB 对象 Friend2,该对象又包含第一个对象 Friend1本质上使它成为一个循环对象引用。 要么这样,要么
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
Mongo 版本 5.0.2。 Ubuntu 20.0 我在本地主机中启用了 MongoDB 连接的安全性。 我正在尝试通过以下命令使用身份验证详细信息连接我的本地主机 MongoDBmongo ad
我即将将分片的 MongoDB 环境从 2.0.7 升级到 2.2.9,最终我想升级到 2.4.9,但显然我需要通过 2.2 来完成。 2.2 的发行说明声明配置服务器应该首先升级其二进制文件,然后是
目前,我无法在我的虚拟 Ubuntu 机器上远程连接 mongodb 服务器。我无法使用在我的 Windows PC 上运行的 Robomongo 客户端连接,该 PC 也运行 vm。 这是两台电脑的
我创建了一个免费的 mongodb 集群。我创建了一个用户,设置了与 mongodb compass 的连接,复制了连接字符串,然后打开了我的 mongodb compass。将复制的字符串粘贴到那里
我使用 java 代码创建了 mongo 数据库集合索引 dbCollection.createIndex("accountNumber"); 当我看到索引使用 db.accounts.getInde
我是一名优秀的程序员,十分优秀!