Files
wekan/docs/Features/Admin-Panel/Problems/Tests.md
T
Lauri Ojansivu acd6c500e5 Docs: Admin Panel / Problems: what each feature is, how to use it, how its numbers are calculated, how it works, and its commits.
RAM usage, the Problems README, Recovery, Repairs, Rules Report, Security
Report, Snap, Speed, Summary and Tests now open with what the feature is,
links to read more, step-by-step use, how each number is computed and how it
is implemented, and end with the commits that built it.

Corrected from the code: the automatic board repair no longer un-binds lists
(since #6515); Recovery's rule email section has Review, Resend, Mark as sent
and Drop, and a section for legacy rule emails; Delete is under Settings; the
Product name is in Settings / Appearance; Speed rows fold per kind of request,
not per path; the RAM row detail has WeKan RSS and no load; the snap command
falls back to MONGO_URL and prints the Databases section.

Thanks to xet7 !
2026-11-22 18:04:25 +02:00

6.2 KiB
Raw Blame History

Admin Panel / Problems / Tests

What it is

Runtime self-checks that failed: the kind of invariant a WeKan unit test asserts, checked on the running server without a browser and without Playwright. Shortly after the server starts it checks that the database answers, that the files directory is writable, that the JavaScript heap has room left and that the disk has free space; only a failure is shown here. Address: /admin/problems/tests. Site administrators only.

Read more

How to use it

Read the failed checks

  1. Log in as a site administrator.
  2. Click your avatar or username at the top right and choose Admin Panel.
  3. Click the Problems tab.
  4. In the left menu, under Reports, click Tests.
  5. Each row is a check that failed: the Source column names the check, the Detail column is its error message. "No new problems." means no check has failed since the stream was last cleared.

Acknowledge or clear the stream

  1. Open Problems → Summary.
  2. Tick Admin Panel → Problems → Tests.
  3. Click Acknowledge or Clear (Summary.md).

Run the checks again

The pane has no button for it. Restart WeKan (the checks run 15 seconds after start), or call the admin-only Meteor method runSelfChecks, which returns { checks, failures }.

Change the free disk space limit

  1. Set WEKAN_MIN_FREE_DISK_MB to the smallest free space, in MiB, the files filesystem may have.
  2. Restart WeKan.

How the numbers are calculated

From server/lib/selfChecks.js and models/lib/runtimeHealth.js:

Number How it is computed
When the checks run once, 15 000 ms after Meteor.startup.
Heap headroom used_heap_size / heap_size_limit from v8.getHeapStatistics(); fails at 0.9 (90 %) or more. The detail is V8 heap <used> MiB of <limit> MiB (<percent>%), each MiB rounded (bytes / 1 048 576).
Free disk space bavail × bsize from fs.statfsSync() on the files directory; fails below the minimum. The minimum is WEKAN_MIN_FREE_DISK_MB × 1024 × 1024 when that is a number of 0 or more, otherwise 256 MiB. The detail is filesystem has <free> MiB free; minimum <min> MiB.
Severity medium for these unit-style checks (testLog.js maps suite unit to medium, security to high, e2e to low).
runSelfChecks result checks is the number of checks (4); failures is how many threw.
Attempts how many failures were folded into this row; empty when once.
Retention rows older than EVENTLOG_RETENTION_DAYS (default 90) are deleted once a day.

How it works in WeKan

Where the rows come from

The tests stream of the eventlog collection, written by server/lib/selfChecks.js through server/lib/testLog.js. The checks run once, 15 seconds after the server starts. Only a failure is recorded; a passing check writes nothing.

Check (Source column) Fails when
self-check:database-roundtrip a one-document query to the database fails
self-check:writable-path a probe file cannot be written and removed in WRITABLE_PATH/files (or in WRITABLE_PATH itself when it already is the files directory)
self-check:heap-headroom the V8 heap uses 90 % or more of its limit
self-check:free-disk-space the files filesystem has less free space than WEKAN_MIN_FREE_DISK_MB (default 256 MiB)

A failure is recorded with category test-failure, name TestBleed, action failed and severity medium; the Detail column is the check's error message.

The admin-only method runSelfChecks runs the checks again on demand; it refuses anybody who is not isAdmin. The pane itself has no button for it.

The table

The same read-only event table as the Security Report: Date and time, Category, Name, Severity, Action, Source, Username, IPv4, Location, IPv6, Location, Attempts and Detail, newest first, 10 rows a page, with a search box that filters as you type. "No new problems." means no check has failed since the stream was last cleared.

Acknowledge or clear the stream on Summary. Rows older than EVENTLOG_RETENTION_DAYS (default 90) are deleted daily. The rows are also on GET /api/admin/problems/tests (REST API).

Tests

Commits