[SERVER-83742] Unable to start a mongod process using mongod –fork as mongo is trying to collectSystemInfo which is very large in size in my system Created: 30/Nov/23 Updated: 05/Feb/24 |
|
| Status: | Open |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Nidhi Kumari | Assignee: | Brad Moore |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Security
|
| Operating System: | ALL |
| Sprint: | Security 2024-01-08, Security 2024-02-05, Security 2024-02-19 |
| Participants: |
| Description |
|
I tried to launch mongoDB server using mongod --fork and I encountered with the below error message: ,“s”:“E”, “c”:“-”, “id”:23077, “ctx”:“main”,“msg”:“Assertion”,“attr”:{“error”:“BSONObjectTooLarge: BSONObj size: 17067964 (0x1046FBC) is invalid. Size must be between 0 and 16793600(16MB) First element: versionString: "Linux version 4.12.14-122.144-default (geeko@buildhost) (gcc version 4.8.5 (SUSE Linux) ) #1 SMP Mon Dec 12 09:21:50 UTC 2022 (bccc371)"”,“file”:“src/mongo/bson/bsonobj.cpp”,“line”:101}}_ I tried to explore more about this issue and got to know that mongo is internally trying to collect system information through the function “ProcessInfo::SystemInfo::collectSystemInfo()” and then saves it into a BSON object and then tries to write it in the DB. Some of the system informations which mongo tries to get is : /proc/version, /proc/cpuinfo, /proc/self/mouninfo, /proc/meminfo, etc I checked the wordcount of these files in the host machine on which we were trying to launch DB. I got the below result : Then, I understood that the issue is due to the large size of “mountinfo”. But now, the issue is how to launch mongoDB without encountering this issue? So, my questions are :
|
| Comments |
| Comment by Brad Moore [ 02/Jan/24 ] |
|
nidhi03october@gmail.com I will look into the feasibility of disabling collecting this info altogether if desired.
However, in the interest of solving the underlying problem: would you be able to share (redacted if necessary) the contents of /proc/self/mountinfo so that I can understand what would cause such a large file? |
| Comment by Alison Rhea Thorne [ 13/Dec/23 ] |
|
Hello nidhi03october@gmail.com, Thank you for your detailed report. I haven't found a way within MongoDB to disable that functionality specifically, nor have I found a way to control the maximum size of a BSON object easily. For now, Im going to assign this to a team that would better be able to determine how to increase the maximum size of a BSON object, which should resolve your issue if one is available. I see you made a post on our community forum. As mentioned there, it might be worth pursuing alternative means of running MongoDB in your environment as was noted by the community. |