{"record":{"id":"f7b54e2edbf83b87","repo":"grafana/k6","slug":"requestsperminutelimit-must-be-greater-than-0","errorCode":null,"errorMessage":"requestsPerMinuteLimit must be greater than 0","messagePattern":"requestsPerMinuteLimit must be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/secretsource/url/url.go","lineNumber":587,"sourceCode":"\tif err := validateConfig(config); err != nil {\n\t\treturn extConfig{}, err\n\t}\n\n\treturn config, nil\n}\n\nfunc validateConfig(config extConfig) error {\n\t// Validate required fields and value constraints\n\tif err := validateURLTemplate(config.URLTemplate); err != nil {\n\t\treturn err\n\t}\n\n\tif config.Timeout.Duration <= 0 {\n\t\treturn errors.New(\"timeout must be greater than 0\")\n\t}\n\n\tif config.RequestsPerMinuteLimit.Int64 <= 0 {\n\t\treturn errors.New(\"requestsPerMinuteLimit must be greater than 0\")\n\t}\n\n\tif config.RequestsBurst.Int64 <= 0 {\n\t\treturn errors.New(\"requestsBurst must be greater than 0\")\n\t}\n\n\tif config.MaxRetries.Int64 < 0 {\n\t\treturn errors.New(\"maxRetries must be non-negative\")\n\t}\n\n\tif config.RetryBackoff.Duration <= 0 {\n\t\treturn errors.New(\"retryBackoff must be greater than 0\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":569,"sourceCodeEnd":604,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/secretsource/url/url.go#L569-L604","documentation":"validateConfig() enforces a strictly positive rate limit for the url secret source: requestsPerMinuteLimit bounds how many secret-fetch requests may be issued per minute, and a limit of 0 or less would forbid all requests. The error fires at startup when an explicit override makes the value non-positive.","triggerScenarios":"Setting K6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT='0' (or negative), or \"requestsPerMinuteLimit\": 0 in the JSON/inline config.","commonSituations":"Trying to disable rate limiting by setting the limit to 0; feeding a negative number from a misconfigured variable; config scaffolding filled with zeros.","solutions":["Remove the K6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT override to use the default","Or set a large positive value to effectively disable throttling, e.g. '1000000'","Validate that computed values (from env or CI variables) are >= 1 before launching k6"],"exampleFix":"# before\nK6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT='0'\n\n# after\nK6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT='1000000'","handlingStrategy":"validation","validationCode":"const rpm = Number(process.env.K6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT);\nif (process.env.K6_SECRET_SOURCE_URL_REQUESTS_PER_MINUTE_LIMIT && rpm <= 0) {\n  throw new Error('requestsPerMinuteLimit must be > 0');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["To disable throttling use a very large limit, never 0","Assert computed limits are >= 1 before launching k6","Centralize secret-source env vars in one checked script"],"tags":["config","secrets","rate-limit","validation","startup"],"backgroundTag":null,"analyzedSha":"93accf6570dcd306ca5e99cc44c393ee3797761b","analyzedAt":"2026-08-15T21:23:27.118Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}