Skip to content

[docs] Document aspire stop socket cleanup for detached AppHosts#1283

Open
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/18296-aspire-stop-socket-cleanup-ec646a140f1cb132
Open

[docs] Document aspire stop socket cleanup for detached AppHosts#1283
aspire-repo-bot[bot] wants to merge 1 commit into
release/13.5from
docs/18296-aspire-stop-socket-cleanup-ec646a140f1cb132

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#18296 by @mitchdenny.

Targeting release/13.5 based on the source PR milestone 13.5.

Why this PR is needed

PR microsoft/aspire#18296 fixed a bug (#17587) where aspire stop did not clean up the backchannel socket file after confirming the AppHost process had terminated. The stale socket caused subsequent CLI commands (aspire add, aspire describe, etc.) to discover the dead socket and fail with connection-timeout errors. This was especially noticeable on Windows where PID reuse could cause the orphan-pruning heuristic to believe the dead process was still alive.

The fix adds explicit socket-file deletion in StopCommand and RunningInstanceManager.StopRunningInstanceAsync once the AppHost process is confirmed stopped. Users can now reliably follow the aspire run --detachaspire stop → subsequent command workflow without stale-socket errors.

Documentation changes

Updated aspire-stop.mdx to document this socket cleanup behavior under a new Stopping a detached AppHost subsection, so users understand that the cleanup happens automatically.

Files modified

  • src/frontend/src/content/docs/reference/cli/commands/aspire-stop.mdx — added subsection describing socket file cleanup after stopping a detached AppHost

Generated by PR Documentation Check for issue #18296 · 2.1K AIC · ⌖ 69.5 AIC · ⊞ 47.5K ·

After aspire stop confirms the AppHost process has terminated, it now
removes the backchannel socket file. This prevents stale-socket errors
when running subsequent commands (aspire add, aspire describe, etc.)
after the stop/detach workflow.

Documents the fix from microsoft/aspire#18296 (fixes #17587).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Jun 23, 2026
@aspire-repo-bot aspire-repo-bot Bot requested a review from JamesNK June 23, 2026 05:38
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1283. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1283 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@IEvangelist IEvangelist marked this pull request as ready for review June 26, 2026 15:14
@IEvangelist IEvangelist self-requested a review as a code owner June 26, 2026 15:14
Copilot AI review requested due to automatic review settings June 26, 2026 15:14
@IEvangelist IEvangelist requested a review from mitchdenny as a code owner June 26, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Aspire CLI reference docs for aspire stop to explain the socket cleanup behavior when stopping a detached AppHost, reflecting the behavior change introduced in microsoft/aspire#18296.

Changes:

  • Added a new Stopping a detached AppHost subsection to aspire stop documentation.
  • Documented that aspire stop removes the backchannel socket file after the detached AppHost process terminates to prevent stale-connection failures in subsequent CLI commands.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -29,6 +29,10 @@ When executed without the `--apphost` option, the command:

The command sends a stop signal to the CLI process that started the AppHost, which ensures a clean shutdown of all resources including the dashboard and any containers or processes that were started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant