I’m running MongoDB (v7.0.12) locally on windows 11, and after leaving my system idle for a few hours, I came back to find out that the mongod server had stopped. Upon restarting the server, I noticed that some collections, which previously had documents, now has none. What is even more confusing is that MongoDB Compass shows the correct document count (e.g., 11.9k documents), even after restarting the app and disconnecting then reconnecting to the mongod server, but the documents themselves are missing (queries return no results and MongoDB compass shows empty collections).
Here are the last logs I think are relevant to the crash:
{"t":{"$date":"2024-09-24T19:40:11.771+03:00"},"s":"I", "c":"WTCHKPT", "id":22430, "ctx":"Checkpointer","msg":"WiredTiger message","attr":{"message":{"ts_sec":1727196011,"ts_usec":770209,"thread":"5516:140731042703184","session_name":"WT_SESSION.checkpoint","category":"WT_VERB_CHECKPOINT_PROGRESS","category_id":6,"verbose_level":"DEBUG_1","verbose_level_id":1,"msg":"saving checkpoint snapshot min: 11136, snapshot max: 11136 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0) base write gen: 162447"}}}
{"t":{"$date":"2024-09-24T19:40:56.015+03:00"},"s":"F", "c":"CONTROL", "id":6384300, "ctx":"ftdc","msg":"Writing fatal message","attr":{"message":"out of memory.n"}}
{"t":{"$date":"2024-09-24T19:40:57.455+03:00"},"s":"I", "c":"CONTROL", "id":31380, "ctx":"ftdc","msg":"BACKTRACE","attr":{"bt":{"backtrace":[...Stack trace...]}}}
Fortunately, the lost data isn’t too important, but I would like to understand what actually happened, what caused it and how can I prevent it from happening in the future?
Mahmoud Ashraf is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.