[SERVER-22046] Mongod crashes with Too Many Open Files while creating collections Created: 04/Jan/16 Updated: 06/Apr/23 Resolved: 04/Jan/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ati And | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | Linux | ||||
| Participants: | |||||
| Description |
|
We're testing MongoDB 3.2 for a use case that have many collections in mongodb. We've script that creates 100K collections in single database at a time. Case 1: We tried to create these collections with open files=64000(default set in mongod init script) Result 1: The mongod stopped with too many open files when created collections reached to ~30K. Case 2: Modified the mongod init script to set limit nofile 999999 999999. Result 2: Created 100K collections without any error. Also applied indexes to these collections. No issues found. Can we change the nofile value to 999999 permanently? How is it going to affect in production env? What would be the good practice to avoid/mitigate the open files issues with WiredTiger with this such use case? Any help would be appreciated. Thanks in advance! |
| Comments |
| Comment by Ramon Fernandez Marina [ 04/Jan/16 ] |
|
The WiredTiger storage engine needs to open one file per collection and one file per index, so please adjust your system limits accordingly. Note that the mongod process will need to open other files as well (e.g.: log file). Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources. Regards, |