In flight and Queries
In flight and Queries
In flight
The In flight page lists the requests that are running right now, longest first. Use it when the server feels stuck and you want to know what it is doing. It is a BoxLang+ page: on Free it shows a BoxLang+ note and the server answers 403.

Each row shows the request (method and path), how long it has run, the name of its thread and how many queries it has run so far. A time over one second turns amber. The list updates live.
Press Hot spots on a request to see where its time goes while it runs, see Hot spots.
Pick a row to see two cards. Queries so far lists the statements the request has run, oldest first: when each started (seconds after the request started), the statement, the rows it returned and how long it took. The header line gives the count and the time spent in the database. A statement that has not finished yet is marked, shows running for its rows, and its time counts up while the page is open. A request that has run no query shows no card. What it is doing is the stack of the request's thread at that moment, up to 80 frames, with BoxLang frames highlighted. If the request finished in the meantime, the page says so.
The statements are shown the way the request page shows them: values are replaced by ? and parameter values stay hidden unless collectors.queries.includeParams is on (then they are listed under the statement, redacted like everywhere else). A long statement is cut at 400 characters. Only the newest 50 statements are listed, with a note when there are more; the count and the database time still cover all of them. Only queries are shown here, not exceptions or log lines.
The list of requests stays small: it carries only the query count and the database time (queries, dbMs). The statements of one request are read when you pick it, from GET inflight/{id}/queries, and again on every update while it stays open:
{
"id": "mgq0k1", "elapsedMs": 7400, "count": 5, "shown": 5, "dbMs": 3912.4, "running": 1,
"queries": [
{ "at": 20.1, "sql": "SELECT id, name FROM customers WHERE active = ?", "rows": 1204, "ms": 18.2, "datasource": "app", "running": false },
{ "at": 5300.5, "sql": "SELECT c.name, SUM(o.total) ...", "rows": null, "ms": 2100.0, "datasource": "", "running": true }
]
}
at and ms are milliseconds. count is every statement started, finished or running, shown how many are listed, dbMs the finished time plus the running time so far, and running how many are running. params is added to a statement only when the parameters are kept. The route answers 404 once the request has finished, and 403 without BoxLang+.
A query is visible while it runs because the query collector opens its span before the statement is sent. Nothing is added to the request path.
For another server, the saved snapshot of its in flight requests carries the newest 20 statements of each request (queryList, the same shape as above). The page shows them as saved, a running statement does not count up and the stack is not read, because the snapshot is a minute old at most.
The page lists requests that Lens tracks. When the console is on, that is every request except the console's own and the paths in excludePaths.
Turn the page off with collectors.inflight.enabled or tabs.hide.
Queries
The Queries page ranks the SQL statements the server has run since it started (or since the last reset). Free shows the 10 heaviest by total time, with the totals of all; BoxLang+ shows every statement kept. Use the bar's Queries panel to look at one request. This page looks across all requests.

One row per statement
A statement is counted with its placeholders, so SELECT * FROM customers WHERE id = ? with a thousand different ids is one row with a thousand runs. Lens keeps the statement text and the numbers only, never parameter values. White space is ignored when statements are compared, and the datasource is part of the key.
| Column | Meaning |
|---|---|
| Runs | How many times it ran, failures included. |
| Avg, Max | Average and longest time in milliseconds. The average counts the runs that did not fail. |
| Total | Time spent in this statement, all runs added. |
| Failed | How many runs failed. |
The tiles at the top show the number of executed queries, distinct statements, failures, slow runs and the average time. A run is slow when it takes at least thresholds.slowQueryMs.
Sort with Slowest, Longest in total, Most executed or Failures, and narrow the list with Filter statements.
The detail
Pick a statement to see its datasource, runs, failures and slow runs, the minimum, average and maximum time, the total time, the rows returned, where it was called from (template and line, when Lens could find it) and the last error. Open the slowest run and Open the latest run jump to those requests on the Requests page, as long as they are still in memory. For AI help on a statement, see Ask Lens and AI help.
How failures are counted
BoxLang announces no event when a query fails, so Lens uses two signs:
- A query that started and never finished is counted as a failure of that statement.
- A database exception that reached the request, with the SQL attached, is counted as a failure of that statement.
A statement that fails to prepare, for example one with an unknown table or bad syntax, never starts a query. It shows up here only when its error reaches the request. If your code catches the error, the failure is not counted. A failed run is listed as its own row, because Lens does not know the datasource of a run that did not finish.
Limits
Lens keeps up to 500 statements. When it is full, the statement seen least recently is dropped. The statistics are in memory, are cleared by a restart, and are not saved by the Plus disk store. Reset clears them. It is for admins, is written to the audit log and is refused when console.readOnly is on.
The page and the bar's query collector share one switch, collectors.queries.enabled. With the collector off, the page is gone.