Skip to content

Handle monitor stop gracefully when metrics server is dead - #431

Merged
ravjotbrar merged 1 commit into
mainfrom
fix/monitor-stop-dead-node
Jul 30, 2026
Merged

Handle monitor stop gracefully when metrics server is dead#431
ravjotbrar merged 1 commit into
mainfrom
fix/monitor-stop-dead-node

Conversation

@ravjotbrar

@ravjotbrar ravjotbrar commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Description

When a metrics server crashes (process exits), clicking "Stop" in the UI fails silently — ECONNREFUSED on the stop request leaves monitorRunning: true in the frontend, causing a stuck banner.

In runMonitorForNode, when a stop request fails (catch block), send monitorFulfilled with monitorRunning: false instead of monitorError. The metrics server is dead, so monitor is effectively stopped. Start request errors still report as monitorError.

Before the change

Untitled.mov

After the change

Screen.Recording.2026-07-29.at.4.40.18.PM.mov

Signed-off-by: ravjotb <ravjot.brar@improving.com>
@ravjotbrar ravjotbrar linked an issue Jul 29, 2026 that may be closed by this pull request
@ravjotbrar
ravjotbrar requested review from ArgusLi and nassery318 July 30, 2026 00:26
@ravjotbrar
ravjotbrar merged commit 37e80cc into main Jul 30, 2026
8 checks passed
ravjotbrar added a commit that referenced this pull request Jul 30, 2026
Signed-off-by: ravjotb <ravjot.brar@improving.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitor cannot be stopped when metrics server crashes

2 participants