Repository navigation
fix(cleanup): stop the instance once its service is deleted - #20
Merged
Merged
Conversation
After deleting the service, the script exited and supervisor restarted it into a loop of 404 deletes, while the instance stayed up (and billed) until its open requests reached the 3600 s timeout. Shut supervisord down once the delete is accepted or the service is already gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JulienChampagnol
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In Vease cloud sessions, once
/geode/healthreturned 500,cleanup.bashdeleted the Cloud Run service and exited — but supervisor (autorestart=true) restarted it, giving ~110 DELETE calls per session that all returned 404 (8,000+/day, some throttled with RESOURCE_EXHAUSTED). Meanwhile the instance kept running (2 vCPU, always on) until its open requests (e.g. the back's/eventsstream) hit the 3600 s request timeout. Nightly e2e sessions that should last 3–5 min were billed ~60 min each.What
supervisorctl shutdown, so the container exits and the instance stops immediately.Tests
Built the image locally and checked that
supervisorctl -c /etc/supervisord.conf shutdownstops the container (exit 0).Root-cause fix in OpenGeodeWeb-Back: event streams now close once the server timed out.
🤖 Generated with Claude Code