[SERVER-27131] While inserting records into MongoDB, the used memory of the instance running MongoDB keeps growing until it is shutdown Created: 20/Nov/16 Updated: 02/Dec/16 Resolved: 21/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | 3.2.10, 3.2.11 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Haytham Salhi | Assignee: | Kelsey Schubert |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
I am running mongoDB server on an instance of 1 GB RAM. I have my client application on the other side inserting records for a somewhat long period of time (~ 1 day to 2 days). What is happening is that the free memory of the instance keeps decreasing (or the used memory keeps increasing) until it reaches the maximum and seems the operating system kills the mongoDB. I had two types of exceptions: *The first one: *
or the second one (resulting from shutting down the mongoDB after the memory is exhausted)
|
| Comments |
| Comment by Kelsey Schubert [ 02/Dec/16 ] |
|
Hi haytham.salhi, We've included this change in behavior in our latest iteration of our documentation here: https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption--wiredTigerCacheSizeGB. If you would like workarounds to be listed for the documentation for older versions of MongoDB, please feel free to open a DOCS ticket by clicking "report a problem" on the same page. Kind regards, |
| Comment by Haytham Salhi [ 21/Nov/16 ] |
|
Thank you Thomas for the clarification. If such issue was previously reported, I think reflecting the solution (workarounds) on the manuals and documentation would be better as they are the first place where the developers go to when such issues appear, especially if solutions like the ones you mentioned are not indexed by search engines. Anoter point to mention, I tried to specify a float value for wiredTigerCacheSizeGB (e.g. 0.5), but when attempting to start mongoDB, it does not run and the status remains 'stop'. Best, |
| Comment by Kelsey Schubert [ 21/Nov/16 ] |
|
Hi haytham.salhi, Thank you for providing the requested information. The output indicates that you are running 3.2.11 rather than 3.3.11 and I've updated the ticket to reflect that. In MongoDB 3.2.11, the default WiredTiger cache size is 1gb or 60% of available memory, whichever is larger. Additionally, it is expected that a system would run out of memory if the entirety of available memory was allocated to the WiredTiger cache. In MongoDB 3.4, we have changed the default cache size to have a lower bound of 256mb to improve behavior when running WiredTiger on machines with little memory ( Please review I'm closing this ticket since the required work has been completed in the linked tickets. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-users group. Kind regards, |
| Comment by Haytham Salhi [ 21/Nov/16 ] |
|
You might need to give attention to the files labeled with 19/11. |
| Comment by Haytham Salhi [ 20/Nov/16 ] |
|
@Thomas: Attached is what you required. db version v3.2.11 |
| Comment by Daniel Pasette (Inactive) [ 20/Nov/16 ] |
|
Can you also please confirm the version of mongod you are using? Please post the output of mongod --version. |
| Comment by Kelsey Schubert [ 20/Nov/16 ] |
|
Hi haytham.salhi, Thanks for reporting this issue. So we can continue to investigate, would you please upload an archive of the diagnostic.data directory for an affected mongod? Thank you, |
| Comment by Haytham Salhi [ 20/Nov/16 ] |
|
The instance is running Linux OS 14.04 LTS. |