mongod dies at start with a core dump because the CPU is too old
mongod.service ends with result core-dump a moment after startShort answer
MongoDB 5.0 and later needs the AVX instruction set on x86_64, and the ARMv8.2-A microarchitecture on arm64. On a CPU below that, mongod crashes at start instead of printing an error. Check the CPU flags, then move to hardware that meets the requirement.
Fix it fast
1Find out which cause you have
Find the CPU architecture. Then check for the avx flag on x86_64.
uname -m grep -o -m1 -w avx /proc/cpuinfo || echo "no avx flag"2Match what you see, then jump to its fix
What does the error look like?
mongod.service ends with result core-dump a moment after startmongod crashes at start on a CPU without the avx flagmongod crashes at start on an arm64 board older than ARMv8.2-A
Cause 1 of 2
The x86_64 CPU has no AVX
1Check
The MongoDB production notes state that MongoDB 5.0 and later requires the AVX instruction set, available on select Intel and AMD processors. Some low-end and some virtualised CPUs do not expose it.
lscpu | grep -i "model name"
mongod --version | head -n 12Fix
Run MongoDB on a machine whose CPU has AVX. If it is a VM, ask the host provider for a CPU type that exposes AVX. Running a release below 5.0 avoids the rule, but old releases stop getting fixes once they reach end of life.
# after moving to a host that reports avx
sudo systemctl start mongod3Verify
The service stays active.
systemctl status mongodConfirmed by mongodb.com
Cause 2 of 2
The arm64 CPU is older than ARMv8.2-A
1Check
On arm64 MongoDB needs the ARMv8.2-A or later microarchitecture. Since 5.0, mongod, mongos and the legacy mongo shell no longer support arm64 platforms below it.
uname -m
lscpu | grep -i -E "model name|architecture"2Fix
Use an arm64 host that meets ARMv8.2-A, or an x86_64 host with AVX. Look up the exact core of your board in the vendor's data sheet.
# no setting fixes this; move to hardware that meets ARMv8.2-A, then:
sudo systemctl start mongod3Verify
On the new host, start the service and check it.
sudo systemctl start mongod
systemctl status mongodConfirmed by mongodb.com
How do I stop it coming back?
- Check the CPU against the production notes before picking a server, VM type or board for MongoDB.
- When you move a VM between hosts, confirm the avx flag is still present.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Servers
MongoDB pod will not run on a Kubernetes node whose CPU lacks AVX
MongoDB deployment not working in Kubernetes because the processor does not have AVX support
MongoDB 5.0 and later only runs on x86_64 CPUs that support the AVX instruction set.
2 causes, each with a fixServers
mongod.service exits with an error on Ubuntu and the cause is hidden
Attempted to create lock file on a read-only directory: ...
When mongod.service exits straight away, the reason is in the mongod log, not in systemctl.
2 causes, each with a fixServers
dnf cannot install MySQL on Amazon Linux 2023
dnf cannot find a mysql-server package on Amazon Linux 2023
Amazon Linux 2023 documents MariaDB, not MySQL, as its database server, with packages named mariadb105 and mariadb105-server.
3 causes, each with a fixServers
Ansible hangs, then times out waiting for the sudo prompt
a playbook using become seems to hang
Ansible ran sudo on the target and never saw the answer it expected.
3 causes, each with a fixServers
Apache on Ubuntu returns 404 Not Found for my site
The requested URL was not found on this server.
On Ubuntu a 404 from Apache usually means the request maps to a path that has no file.
3 causes, each with a fixServers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fix