Handle spending-limit errors gracefully with escalating cooldowns#63
Open
slacki-ai wants to merge 2 commits intolongtermrisk:v0.9from
Open
Handle spending-limit errors gracefully with escalating cooldowns#63slacki-ai wants to merge 2 commits intolongtermrisk:v0.9from
slacki-ai wants to merge 2 commits intolongtermrisk:v0.9from
Conversation
Spending-limit errors from RunPod (e.g. "Failed to start GPU") now trigger a 5-minute global provisioning pause instead of penalising individual GPU types. Non-spending-limit hardware failures use escalating cooldowns within the same UTC day: 1 hour → 6 hours → 2 days (previously a flat 7-day cooldown). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
90b0168 to
bb71ab3
Compare
…ldown dates - When a spending-limit error is detected in the inner hardware-candidate loop, stop trying other GPU types immediately (they'll all fail for the same account-wide reason). - Log spending-limit hits at WARNING level with a clear message. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
How it works
is_spending_limit_error()detects spending-limit patterns in RunPod error messagesrecord_failure()sets a global pause timestamp instead of counting toward the per-hardware failure thresholdscale_workers()checksis_spending_limit_paused()at the top and returns early (with a log warning), keeping all jobs inpendingstateConfiguration
All new values are env-configurable:
OW_RUNPOD_SPENDING_LIMIT_PAUSE_SECONDS— global pause duration (default: 300s)OW_RUNPOD_HARDWARE_COOLDOWN_SECONDS— base cooldown (default: 3600s, down from 604800s)Test plan
🤖 Generated with Claude Code