Files
wekan/docs/Features/Admin-Panel/Problems/Speed.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.8 KiB

Admin Panel / Problems / Speed

What it is

The Speed pane lists the HTTP requests that took too long to answer. WeKan times every request that is not a static file, and when one takes at least two seconds (by default) it records it here, so an administrator can see which pages or REST API calls are slow and how often. Address: /admin/problems/speed. Site administrators only.

Read more

How to use it

Read the slow requests

  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 Speed.
  5. Read the table, newest first. The Detail column says which request it was and how long it took, for example GET /b/abc/my-board — 5120ms >= 2000ms.
  6. Type part of a path, a username or an address in the search box to filter the rows as you type.

Acknowledge or clear the stream

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

Change or turn off the threshold

  1. Set WEKAN_SLOW_REQUEST_MS to the number of milliseconds a request may take before it is recorded, or to 0 to turn the detector off.
  2. Restart WeKan.

How the numbers are calculated

From server/lib/speedMiddleware.js:

Number How it is computed
Duration (<ms>ms) Date.now() when the request arrives, subtracted from Date.now() when the response's finish event fires.
Threshold WEKAN_SLOW_REQUEST_MS, default 2000; 0 (or any value that is not above 0) turns the detector off.
Severity medium when the duration is at least three times the threshold (6000 ms by default), otherwise low.
Attempts how many slow requests were folded into this row (count); empty when it happened once.
New-problem count on Summary rows newer than the last acknowledgement whose severity is not info.
Rows per page 10 (TABLE_PAGE_ROWS_PER_PAGE).
Retention rows older than EVENTLOG_RETENTION_DAYS (default 90) are deleted once a day.

Folding: a row's identity is its stream, name, category, action, source, severity and CWE (models/lib/eventLogSummary.js), not its path. So every slow request of the same severity is folded into the same row, whose count and date go up, and the Detail column shows the most recent request. (An earlier version of this page said rows were folded per request path; the detail text is not part of the identity.)

How it works in WeKan

Where the rows come from

The speed stream of the eventlog collection. Today one detector writes it: server/lib/speedMiddleware.js times every HTTP request that is not a static asset (.js, .css, .png, .jpg/.jpeg, .gif, .svg, .woff/.woff2, .ico, .map, .webp, .avif) or under /cdn/, and when one takes at least WEKAN_SLOW_REQUEST_MS milliseconds (default 2000; 0 turns the detector off) it records, through server/lib/speedLog.js:

  • category slow-request, name SlowRequest, action detected, source http;
  • severity low, or medium when it took three times the threshold or more;
  • detail <METHOD> <path> — <ms>ms >= <threshold>ms, without the query string.

Rows stored under the old name SlowBleed are renamed to SlowRequest at startup. Timing never breaks a request: any error in the middleware is swallowed.

DDP methods and publications are not timed here; their live call counts and durations are on Instrumentation. The CPU monitor writes its own stream, shown on CPU usage.

The same kind of slow request that happens again is folded into the same row, whose count and date go up (Design.md).

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. It shows "No new problems." when the stream is empty. The rows come from the admin-only eventLogCount and eventLogPage methods in models/eventLog.js.

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/speed (REST API).

Tests

Commits