MongoDB 8.2.5 (tcmalloc-google) SIGSEGV crash loop on Linux kernel 6.19
MongoDB(8.*) container/quadlet crashes on tumbleweed with 6.19.*
mongodb - Mongo service crashed. Need to find reason of crash - Stack Overflow
Do I need to tune sysctl.conf under linux when running MongoDB? - Stack Overflow
I'm running mongo 8.0/2 together with unifi on my tumbleweed system, via podman.
After an update, TW decided to switch my kernel from my -longterm version to 6.19.3/5, and my mongo started crashing after running for about a minute, without any clear log-entries, apart from a backtrace I cant seem to find in journalctl any more...
After i noticed the bootctl/uefi kernel eff-up, I restored my -longterm 6.12 kernel and everything is fine.
Is this Mr murphy just being very active on my system, or what?
I had the same issue. After some searching I guessed it was os that sacrificed mongod for memory. If kernel killed your mongod you can find the logs in kernel logs
Mostly kernel logs will be in /var/log/kern.log, The logs might be rotated.
So better to do a grep
grep mongod /var/log/kern.log*
if the logs are archived
find -name \*kern.log.*.gz -print0 | xargs -0 zgrep "mongod"
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118361] mongod invoked oom-killer: gfp_mask=0x24201ca, order=0, oom_score_adj=0
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118365] mongod cpuset=/ mems_allowed=0
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118371] CPU: 0 PID: 1830 Comm: mongod Not tainted 4.4.0-1062-aws #71-Ubuntu
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118531] [ 1301] 112 1301 300787 181207 485 4 0 0 mongod
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118680] Out of memory: Kill process 1301 (mongod) score 355 or sacrifice child
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.130161] Killed process 1301 (mongod) total-vm:1203148kB, anon-rss:724828kB, file-rss:0kB
According to MongoDB documentation
The getLog command returns a document with a log array that contains recent messages from the mongod process log.
Please try executing following command in mongo shell to return logs which consist of information related to errors or warnings while initialization of mongod service
db.adminCommand({getLog: "startupWarnings" })
For detailed description regarding getLog method please refer the documentation mentioned in following URL
https://docs.mongodb.org/manual/reference/command/getLog/