louislam/uptime-kuma · error · Error
Retry interval cannot be less than ${MIN_INTERVAL_SECOND} se
Error message
Retry interval cannot be less than ${MIN_INTERVAL_SECOND} seconds What it means
validate() rejects monitor.retryInterval below MIN_INTERVAL_SECOND (currently 1). Runs on addMonitor/editMonitor save.
Source
Thrown at server/model/monitor.js:1631
if (parent != null) {
return await Monitor.isUnderMaintenance(parent.id);
}
return false;
}
/**
* Validate monitor configuration
* @returns {void}
* @throws {Error} If validation fails
*/
validate() {
if (this.interval < MIN_INTERVAL_SECOND) {
throw new Error(`Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`);
}
if (this.retryInterval < MIN_INTERVAL_SECOND) {
throw new Error(`Retry interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`);
}
if (this.response_max_length !== undefined) {
if (this.response_max_length < 0) {
throw new Error(`Response max length cannot be less than 0`);
}
if (this.response_max_length > RESPONSE_BODY_LENGTH_MAX) {
throw new Error(`Response max length cannot be more than ${RESPONSE_BODY_LENGTH_MAX} bytes`);
}
}
// Validate JSON fields to prevent invalid JSON from being stored in database
if (this.kafkaProducerBrokers) {
try {
JSON.parse(this.kafkaProducerBrokers);
} catch (e) {
throw new Error(`Kafka Producer Brokers must be valid JSON: ${e.message}`);View on GitHub (pinned to 6b5ea01557)
Solutions
- Set retryInterval to at least MIN_INTERVAL_SECOND (1s); typically set it equal to or a fraction of interval
- Sanitize imported monitor data so retryInterval is >=1
Example fix
// before monitor.retryInterval = 0; // after monitor.retryInterval = 20;
Defensive patterns
Strategy: validation
Validate before calling
const MIN_INTERVAL_SECOND = 1;
if (monitor.retryInterval < MIN_INTERVAL_SECOND) throw new Error(`retryInterval must be >= ${MIN_INTERVAL_SECOND}`); Type guard
function isValidRetryInterval(v) { return Number.isFinite(v) && v >= 1; } Try / catch
try { await socket.emit("editMonitor", payload); } catch (e) { /* surface e.message */ } Prevention
- Sanitize retryInterval in imported/backup data to >=1
- Keep retryInterval at or below interval so retries are meaningful
When it happens
Trigger: Calling addMonitor/editMonitor with retryInterval set to 0, negative, or below 1 second.
Common situations: Imported backup with a zero retryInterval; manual API call omitting the field defaulting badly; fork with different limits.
Related errors
- Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds
- Response max length cannot be less than 0
- Response max length cannot be more than ${RESPONSE_BODY_LENG
- Kafka Producer Brokers must be valid JSON: ${e.message}
- Kafka Producer SASL Options must be valid JSON: ${e.message}
AI-assisted analysis of louislam/uptime-kuma@6b5ea01557 (2026-08-12).
Data as JSON: /api/errors/f730a554fd3acfaa.
Report an issue: GitHub.