mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
With database=ferretdb, snap-src/bin/wekan-control waits for FerretDB to accept connections before starting node - WeKan does not open its HTTP port until the database answers. That wait loop had no timeout and no diagnostics, so if FerretDB never started listening (crashed or arch-incompatible per-arch binary, locked/corrupt SQLite, or the service left disabled by a failed migration hand-off), WeKan blocked there forever: the service showed active but the port never opened and the only symptom was a silent 'FerretDB not ready yet' loop. uusijani's wekan.log stopped right after the startup env dump, confirming control never reached node main.js. Mirror the MongoDB branch: after WEKAN_DB_WAIT_TIMEOUT seconds (default 120, overridable) print an actionable hint once, then keep retrying - pointing to 'snap logs <snap>.ferretdb', naming the SQLite dir to check for locks/corruption, the arch-mismatch case, the snap start --enable recovery, and the 'snap set <snap> database=mongodb' fallback. Regression test tests/ferretdbWaitTimeout.test.cjs, including a negative guard that the wait is not a silent unbounded loop again. Thanks to uusijani (report) and xet7 (fix).