The database health probe (server/lib/databaseHealth.js) saw restarts, slow storage and a full disk, but not what made one instance slow: a 10 GB collection scanned three times per search, and an hourly job reading all 1.1 million cards (#6824, #6825). Both were visible only in MongoDB's own log, as "Slow query" lines with COLLSCAN, and in serverStatus: 1.6 billion documents read in two hours. Two more checks, every 5 minutes with the others: - db.collection-scan: the "Slow query" lines MongoDB keeps (getLog 'global'), newer than the last probe, where a query read a whole collection of at least 10,000 documents. Grouped by collection and the field names filtered on - never values - with count, documents read and time. Small tables read whole by design (settings, roles) and internal namespaces are left out. Needs the getLog privilege; without it, and on FerretDB, the check finds nothing and is skipped. - db.scan-rate: serverStatus.metrics.queryExecutor.scannedObjects between two probes above 50,000 documents per second. A database restart, which resets the counter, is not counted. Both are rows in Admin Panel / Problems / Database with what to do; docs/Databases/MongoDB/Storage-Requirements.md lists them. tests/databaseHealthScans.test.cjs drives the log parsing and the rate, including that a filter's values never reach the row. From the reporter's patch. Thanks to Raymond-Voogt and xet7 ! Fixes #6826.
Databases
WeKan stores its data in a MongoDB-compatible database. That can be MongoDB
itself, or FerretDB — which speaks the MongoDB wire protocol and stores the data
in SQLite, PostgreSQL, MySQL, MariaDB or SAP HANA. The default is FerretDB v1
with its embedded SQLite, so a fresh docker compose up -d needs no database
server at all.
Which databases are supported, and how each is tested: Supported.md - FerretDB v1 on SQLite (the default), PostgreSQL, MySQL, MariaDB and SAP HANA, and MongoDB 6, 7, 8 and 9.
| Directory | What is in it |
|---|---|
| FerretDB/1/ | FerretDB v1 — the default. SQLite, PostgreSQL, MySQL, MariaDB, SAP HANA |
| FerretDB/2/ | FerretDB 2 — PostgreSQL with the DocumentDB extension |
| MongoDB/ | MongoDB itself: drivers, versions, the OpLog, and old CPUs |
| Migrations/ | WeKan's own schema migrations and how they are verified |
| ToroDB/ | ToroDB — a MongoDB proxy to PostgreSQL. No longer developed |
FerretDB
Replacing MongoDB with FerretDB. Both of the v1 backends WeKan ships by default are confirmed working with a real Meteor 3 client — the embedded SQLite and vanilla PostgreSQL (#6509); MySQL, MariaDB and SAP HANA are experimental.
- FerretDB v1 — the five backends, and how to start each
- FerretDB 2 + PostgreSQL install
- https://forums.meteor.com/t/ferretdb-1-18-now-has-oplog-support-trying-replace-mongodb-6-x-with-ferretdb-postgresql-or-ferretdb-sqlite/61092
MongoDB
- Driver-System.md — which Node driver is used for which server version
- Version-Management.md — detecting the server version and switching binaries
- Supported.md — the MongoDB versions tested with current WeKan: 6, 7, 8 and 9
- Compatibility-Guide.md — fixes from the Meteor 2.14 era, MongoDB 3.0 … 8.0
- Oplog-Configuration.md — why the OpLog matters, and how to enable it
- OpLog-Enablement.md — its status per deployment platform
- avx-qemu.md — MongoDB 5+ on a CPU without AVX
- raspi4-qemu.md — MongoDB 5+ on a Raspberry Pi 4 and older
Migrations
- Migrations/ — the schema-migration system, its review notes and
verify-migrations.sh
ToroDB
ToroDB is not developed anymore. ToroDB was about adding a MongoDB proxy to PostgreSQL or MySQL.
- ToroDB/PostgreSQL/ — the compose file and notes kept here