-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
Make Discord healthMonitor configurable via channels.discord config #41471
Copy link
Copy link
Closed
Description
Problem
The Discord channel health monitor settings are currently hardcoded in the source code with these values:
checkIntervalMs: How often to check channel healthstaleEventThresholdMs: How long before a channel is considered stalemaxRestartsPerHour: Maximum restart attempts per hour
Impact
- No flexibility - Cannot tune these values for different usage patterns
- Unnecessary restarts - On quiet channels, the default stale threshold may trigger restarts when the channel is simply inactive (no new messages)
- No per-channel customization - All channels use the same hardcoded values regardless of their activity level
Proposed Solution
Add a channels.discord.healthMonitor configuration section that allows users to customize these settings.
Example Config Structure
{
"channels": {
"discord": {
"healthMonitor": {
"checkIntervalMs": 30000,
"staleEventThresholdMs": 120000,
"maxRestartsPerHour": 3
}
}
}
}Fallback Behavior
- If config section is not present, use sensible defaults (current hardcoded values or improved defaults)
- Validate values to prevent misconfiguration (e.g., minimum thresholds)
Investigation Reference
This was identified during debugging of unnecessary Discord channel restarts in production. The hardcoded values did not account for quiet periods where no events are expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.