Running Queries Page Shows Interrupted or Expired Queries as Still Running in MotherDuck UI
Running Queries page shows interrupted/expired queries as still “Running” Environment
MotherDuck Web UI
DuckDB clients:
duckdb/v1.5.4(wasm)
duckdb/v1.5.4(linux)
duckdb/v1.4.2(osx)
Observed on: 2026-07-16
Summary The Running Queries page displays dozens of queries with the status Running, even though md_active_server_connections() indicates that all of those connections have already been interrupted or expired. The UI appears to treat interrupted connections as still running. Steps to reproduce
- 1.
Start one or more long-running queries.
- 2.
Interrupt them using:
- 3.
Open Monitor → Running Queries.
Observed behavior The Running Queries page still shows many entries with status Running. However, querying the server shows there are no active queries:
SELECT
client_connection_id,
client_user_agent,
client_query,
server_transaction_elapsed_time
FROM md_active_server_connections()
WHERE client_connection_id <> md_current_client_connection_id()
AND server_transaction_elapsed_time > INTERVAL '0.9' SECOND
AND server_interrupt_reason IS NULL;Result:
0 rowsThe same connections are still present in md_active_server_connections(), but they all have a non-null interrupt reason:
SELECT
client_connection_id,
server_interrupt_reason
FROM md_active_server_connections()
WHERE client_connection_id <> md_current_client_connection_id()
AND server_transaction_elapsed_time > INTERVAL '0.9' SECOND;Example values:
Connection Error: interrupted by user
Connection Error: time-based lease expired
Summary query:
SELECT
count(*) FILTER (
WHERE server_interrupt_reason IS NULL
) AS active_connections,
count(*) FILTER (
WHERE server_interrupt_reason IS NOT NULL
) AS interrupted_connections
FROM md_active_server_connections()
WHERE client_connection_id <> md_current_client_connection_id()
AND server_transaction_elapsed_time > INTERVAL '0.9' SECOND;Result:
active_connections = 0
interrupted_connections = 32Expected behavior The Running Queries page should only display connections that are actually running. Connections with a non-null server_interrupt_reason should either:
disappear from the Running Queries page, or
be displayed with a status such as Interrupted, Expired, or Completed, rather than Running.
Additional observations The browser polling query appears to be:
FROM md_active_server_connections()
WHERE client_connection_id != md_current_client_connection_id()
AND server_transaction_elapsed_time > INTERVAL '0.9' SECONDBased on the observed behavior, it looks like the UI is not excluding connections where:
server_interrupt_reason IS NOT NULLAs a result, interrupted or expired connections continue to appear as “Running”.
.png)