Files
wekan/docs/Databases/MongoDB
Lauri Ojansivu 8f27060b4e Database health: a nightly mongodump no longer raises the "documents per second" problem.
#6945: the probe compares MongoDB's scannedObjects between two probes, and
that counts every document read by anything. A nightly mongodump reads the
whole database, so its one interval went over 50,000 per second every
morning - 632,900 on an instance of 1.1 million cards - and the row said
"queries without a fitting index" while naming none, with nothing to fix.

A query without a fitting index is also a collection scan in MongoDB's
"Slow query" log, which the same probe already reads. Now the log is read
first, and the rate is reported only when a collection scan of the same
interval explains it (scanRateReportable). When the log cannot be read, the
rate alone decides, as before, so a missing index is never hidden. And the
scans of MongoDB's Database Tools themselves - mongodump and mongoexport,
named by their appName - are not reported as collection scans: they read
every collection whole by design.

Tests (tests/databaseHealthScans.test.cjs): a high rate with a scan, or
with the log unreadable, is reported; negative: a high rate with the log
read and no scan, and an ordinary rate, are not; the dump's own COLLSCAN
lines are no group, while the same scan by WeKan is; the probe reads the
log before it judges the rate, and nothing reports on the threshold alone.

Thanks to Raymond-Voogt and xet7 !

Fixes #6945.
2026-11-25 16:18:04 +02:00
..

MongoDB

WeKan's classic database. WeKan runs on MongoDB 3.0 … 8.0, and picks the Node driver for the server it finds; docker-compose-mongodb-v7.yml is the compose file for it. The default database of WeKan is FerretDB v1 instead, which needs no database server.

File What it answers
Driver-System.md Which Node driver is used for which server version, and how that is decided
Version-Management.md Detecting the server version and switching to the matching binary + driver
Compatibility-Guide.md What breaks between MongoDB 3.0 and 8.0 with Meteor, and the fixes
Storage-Requirements.md Why the data directory must be on a local filesystem, and what an SMB/NFS-backed one does (fsync ENOSPC aborts, slow queries)
Oplog-Configuration.md Why the OpLog matters for pub/sub, and how to turn it on
OpLog-Enablement.md Whether it IS on, per deployment platform
avx-qemu.md Running MongoDB 5+ on a CPU with no AVX, through qemu-user
raspi4-qemu.md The same on a Raspberry Pi 4 and older (ARMv8.0, no ARMv8.2-A)

Both qemu pages describe what WeKan's cpu-exec helper now does by itself: it runs a binary under qemu-user when the CPU lacks the features that binary needs.

See also