{"record":{"id":"6dd8c84a0ca451ac","repo":"louislam/uptime-kuma","slug":"failed-to-create-measurement-this-formattoomany","errorCode":null,"errorMessage":"Failed to create measurement: ${this.formatTooManyRequestsError(hasAPIToken)}","messagePattern":"Failed to create measurement: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/monitor-types/globalping.js","lineNumber":100,"sourceCode":"        }\n\n        if (monitor.ipFamily === \"ipv4\") {\n            opts.measurementOptions.ipVersion = IpVersion[4];\n        } else if (monitor.ipFamily === \"ipv6\") {\n            opts.measurementOptions.ipVersion = IpVersion[6];\n        }\n\n        log.debug(\"monitor\", `Globalping create measurement: ${JSON.stringify(opts)}`);\n        let res = await client.createMeasurement(opts);\n\n        // Retry if the server returns a 500 error\n        if (!res.ok && Globalping.isHttpStatus(500, res)) {\n            res = await client.createMeasurement(opts);\n        }\n\n        if (!res.ok) {\n            if (Globalping.isHttpStatus(429, res)) {\n                throw new Error(`Failed to create measurement: ${this.formatTooManyRequestsError(hasAPIToken)}`);\n            }\n            throw new Error(`Failed to create measurement: ${this.formatApiError(res.data.error)}`);\n        }\n\n        log.debug(\"monitor\", `Globalping fetch measurement: ${res.data.id}`);\n        let measurement = await client.awaitMeasurement(res.data.id);\n\n        if (!measurement.ok) {\n            throw new Error(\n                `Failed to fetch measurement (${res.data.id}): ${this.formatApiError(measurement.data.error)}`\n            );\n        }\n\n        const probe = measurement.data.results[0].probe;\n        const result = measurement.data.results[0].result;\n\n        if (result.status === \"failed\") {\n            throw new Error(this.formatResponse(probe, `Failed: ${result.rawOutput}`));","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/monitor-types/globalping.js#L82-L118","documentation":"Thrown by the Globalping monitor when createMeasurement returns HTTP 429. The message is built by formatTooManyRequestsError(hasAPIToken): without an API token you are on the anonymous credit pool, with one you are on the account pool; both are exhausted when this fires. A single 500 is retried once before this path; 429 is not retried.","triggerScenarios":"Run a Globalping (ping/http/dns/traceroute/mumble) monitor after the configured or anonymous credit quota is depleted. createMeasurement returns {ok:false} with status 429 and Globalping.isHttpStatus(429,res) is true.","commonSituations":"Many Globalping monitors on one instance exhausting the free anonymous tier; long-running monitors after a credit grant expired; bursts of retries against a failing target; shared IP hitting the anonymous rate limit.","solutions":["Add an API token in the monitor/globalping settings to raise limits, or add credits at the link in the message.","Reduce the number or frequency of Globalping monitors (raise interval).","Sponsor or host probes per Globalping's program to raise your cap.","Wait for the credit window to reset if it is time-bounded."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const hasToken = typeof monitor.globalpingApiToken === \"string\" && monitor.globalpingApiToken.length > 0;\n// credits are an external quota; validate presence of token and a reasonable interval\nfunction conservativeInterval(monitors) { return Math.max(60, Math.ceil(3600 / Math.max(1, monitors))); }","typeGuard":"function hasGlobalpingToken(monitor) {\n  return typeof monitor?.globalpingApiToken === \"string\" && monitor.globalpingApiToken.length > 0;\n}","tryCatchPattern":"try {\n  await gp.monitor(client, monitor, heartbeat, hasToken);\n} catch (e) {\n  if (/run out of credits/.test(e.message)) { heartbeat.status = DOWN; heartbeat.msg = e.message; return; }\n  throw e;\n}","preventionTips":["Add a Globalping API token and credits before relying on the monitor.","Throttle Globalping monitor count and interval to stay under your tier."],"tags":["globalping","rate-limit","credits","api","uptime-kuma"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}