{"record":{"id":"02a8cc83317f1ded","repo":"louislam/uptime-kuma","slug":"no-heartbeat-in-the-time-window","errorCode":null,"errorMessage":"No heartbeat in the time window","messagePattern":"No heartbeat in the time window","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/model/monitor.js","lineNumber":760,"sourceCode":"                    log.debug(\n                        \"monitor\",\n                        `[${this.name}] Checking monitor at ${dayjs().format(\"YYYY-MM-DD HH:mm:ss.SSS\")}`\n                    );\n                    const bufferTime = 1000; // 1s buffer to accommodate clock differences\n\n                    if (previousBeat) {\n                        const msSinceLastBeat = dayjs.utc().valueOf() - dayjs.utc(previousBeat.time).valueOf();\n\n                        log.debug(\"monitor\", `[${this.name}] msSinceLastBeat = ${msSinceLastBeat}`);\n\n                        // If the previous beat was down or pending we use the regular\n                        // beatInterval/retryInterval in the setTimeout further below\n                        if (\n                            previousBeat.status !== (this.isUpsideDown() ? DOWN : UP) ||\n                            msSinceLastBeat > beatInterval * 1000 + bufferTime\n                        ) {\n                            bean.duration = Math.round(msSinceLastBeat / 1000);\n                            throw new Error(\"No heartbeat in the time window\");\n                        } else {\n                            let timeout = beatInterval * 1000 - msSinceLastBeat;\n                            if (timeout < 0) {\n                                timeout = bufferTime;\n                            } else {\n                                timeout += bufferTime;\n                            }\n                            // No need to insert successful heartbeat for push type, so end here\n                            retries = 0;\n                            log.debug(\"monitor\", `[${this.name}] timeout = ${timeout}`);\n                            this.heartbeatInterval = setTimeout(safeBeat, timeout);\n                            return;\n                        }\n                    } else {\n                        bean.duration = beatInterval;\n                        throw new Error(\"No heartbeat in the time window\");\n                    }\n                } else if (this.type === \"docker\") {","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/model/monitor.js#L742-L778","documentation":"Thrown by a push-type monitor on the overdue branch: a previous heartbeat exists but more than beatInterval*1000+bufferTime ms have passed since it, or the previous beat was already down/pending. bean.duration is computed from msSinceLastBeat.","triggerScenarios":"A push monitor's push endpoint has not been called for longer than its interval plus the buffer window.","commonSituations":"Source-side cron/systemd timer died; firewall/network blocks the push; push URL secret changed so pushes 404; source host offline.","solutions":["Check the pusher's logs to confirm it is still POSTing to /metrics/push/<token>","Verify the push URL and secret in the pusher exactly match the monitor","Ensure the source host has network egress to the Uptime Kuma instance","Increase the monitor interval if the source legitimately pushes less often"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// A missed push window is reported as a DOWN heartbeat; retry at the source.\n// Ensure the pusher has retry/backoff so transient network failures do not skip a push.\npushWithRetry(url, payload, { retries: 3, backoffMs: 2000 });","preventionTips":["Make the pusher resilient: retry with backoff and alert on pusher-side failures","Keep the monitor interval comfortably above the pusher's real cadence"],"tags":["push","heartbeat","monitoring"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}