mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
A reported test environment (mongo:8.2.2 in Kubernetes) filled its data
volume: the checkpoint's fdatasync returned ENOSPC, WiredTiger panicked and
mongod aborted - and then it kept failing on every start, with the disk long
since freed. MongoDB 8.2 keeps a throwaway WiredTiger instance under
<dbPath>/_tmp/spilldb for queries that spill to disk and empties it itself on
each start; after the abort that emptying failed ("Failed to clear dbpath of
the internal WiredTiger instance: Directory not empty"), mongod opened the
half-emptied directory, found no version file, reported "Failed to open the
spill WiredTiger instance ... database corruption detected" and fasserted.
Nothing retries, so the pod restarts forever. The data itself is intact;
deleting that one directory is the whole fix.
- snap-src/bin/mongodb-control deletes _tmp/spilldb before every mongod
start (no mongod is running at that point, and mongod recreates it), and
its start-failure handler recognises the log line and names the directory.
The snap ships MongoDB 7 today, so this is a no-op until it does not.
- Admin Panel / Problems: the db.restart row now says what a "No space left
on device" abort means for a full disk as well as for a network
filesystem, and both it and db.disk-space name the exact spill directory
to delete when MongoDB 8.2 will not start afterwards. The probe looks the
data directory up once and passes it to both rows.
- docs/Databases/MongoDB/Storage-Requirements.md gets the log signature of
both stages, why the second one never ends, the one command, what must
not be touched, and that Docker/Kubernetes users run it themselves since
the database container is MongoDB's own image.
- tests/databaseHealth.test.cjs pins the spill path, both rows' advice, the
probe wiring, the snap's pre-start deletion (before the first start, after
the running-instance check, and the only recursive delete apart from the
existing FerretDB reset) and the documentation.
Thanks to xet7 !
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
- ../FerretDB/1 — the default database, and the four SQL backends behind it
- ../Migrations — WeKan's own schema migrations