[SERVER-31519] Server shutdown frequently Created: 11/Oct/17 Updated: 07/Nov/17 Resolved: 12/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 3.2.9 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Abhay | Assignee: | Mark Agarunov |
| Resolution: | Done | Votes: | 0 |
| Labels: | MAREF | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Participants: |
| Description |
|
Hello i have live website and have a separate DB server for mongodb under aws t2 medium instance. The server does not respond after some frequent time and to fix it i do a restart of the instance. Following is the log encountered in mongodb log before it gets shutdown
Please help to overcome this issue |
| Comments |
| Comment by Abhay [ 13/Oct/17 ] | |
|
Okay mark then i think i will update the db version, thanks for your effort | |
| Comment by Mark Agarunov [ 12/Oct/17 ] | |
|
Hello sharmasabhay, Looking over the logs, I don't see a correlation between a specific query and the machine running out of memory. Thanks, | |
| Comment by Abhay [ 12/Oct/17 ] | |
|
Hello mark Thanks for those links i will review them but did you find anything in the log file i have sent regarding the queries we are running i mean is it happening due to the queries we are firing in mongodb? | |
| Comment by Mark Agarunov [ 12/Oct/17 ] | |
|
Hello sharmasabhay, There are a few compatibility changes when upgrading from 3.2 to 3.4, however note that mongodb can be simply downgraded from 3.4 to 3.2, especially if the featureCompatibilityVersion has not been set to 3.4. Generally, we recommend a "burn in period" of running mongodb v3.4 before setting the featureCompatibilityVersion to 3.4:
Thanks, | |
| Comment by Abhay [ 12/Oct/17 ] | |
|
Hello mark I believe swapping memory will not fix the issue but as your 2nd suggestion of updating version i think may work if you are sure about it . So will it be safe to update as the db server has live data i means is there any deprecated things which are in 3.2 but not in 3.4 just confirm me this so i can move accordingly. | |
| Comment by Mark Agarunov [ 12/Oct/17 ] | |
|
Hello sharmasabhay, To clarify my previous response, this behavior is likely due to the fact that the machine running mongod has only 1GB of memory. In Mongodb version 3.2, the minimum cache size, which correlates with memory usage, is 1GB, however this was lowered in version 3.4 to 256MB. Upgrading this node to mongodb version 3.4 should alleviate some of the memory pressure and reduce the likelihood of seeing this behavior. Thanks, | |
| Comment by Mark Agarunov [ 12/Oct/17 ] | |
|
Hello sharmasabhay, Thank you for providing these files. Looking over the logs and diagnostic data, I'm not seeing anything that would indicate a bug in mongod. It appears that mongod is killed off by the kernel because the system is out of memory:
According to the diagnostic data, mongod's memory usage is more or less stable: As there is no substantial increase in memory usage, I suspect the system is simply running out of memory, possibly due to other processes running on the machine. I would suggest attempting to add a swap file to the system to alleviate some of the memory pressure and see if this remedies the issue. Please note that 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. 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. Thanks, | |
| Comment by Abhay [ 11/Oct/17 ] | |
|
Hi mark Thanks for the quick response, i have attached the mentioned files in a single zip please review and let me know asap. Thanks | |
| Comment by Mark Agarunov [ 11/Oct/17 ] | |
|
Hello sharmasabhay, Thank you for the report. Looking at the logs you've provided, this looks to be due to the server running out of memory, resulting in mongod being terminated. To get a better idea of why this may be happening, could you please provide the following:
This should give some more insight into possible causes. Thanks, |