{"record":{"id":"d72e93641290bc79","repo":"grafana/k6","slug":"requestsburst-must-be-greater-than-0","errorCode":null,"errorMessage":"requestsBurst must be greater than 0","messagePattern":"requestsBurst must be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/secretsource/url/url.go","lineNumber":591,"sourceCode":"\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":573,"sourceCodeEnd":604,"githubUrl":"https://github.com/grafana/k6/blob/93accf6570dcd306ca5e99cc44c393ee3797761b/internal/secretsource/url/url.go#L573-L604","documentation":"validateConfig() requires requestsBurst, the token-bucket burst size for the url secret source's rate limiter, to be at least 1. A burst of 0 would make the limiter unable to admit even a single request. As with the other numeric fields, the default is valid, so only an explicit non-positive override triggers this.","triggerScenarios":"Setting K6_SECRET_SOURCE_URL_REQUESTS_BURST='0' (or a negative integer), or \"requestsBurst\": 0 in the JSON/inline config.","commonSituations":"Copying the rate-limit settings and zeroing both; assuming burst=0 means 'no burst limit'; CI templates that define every variable with 0 defaults.","solutions":["Remove the K6_SECRET_SOURCE_URL_REQUESTS_BURST override to fall back to the default","Or set it to a positive value, typically >= requestsPerMinuteLimit, e.g. '100'","If computing burst from other values, guard with a max(1, computed) expression"],"exampleFix":"# before\nK6_SECRET_SOURCE_URL_REQUESTS_BURST='0'\n\n# after\nK6_SECRET_SOURCE_URL_REQUESTS_BURST='100'","handlingStrategy":"validation","validationCode":"const burst = Number(process.env.K6_SECRET_SOURCE_URL_REQUESTS_BURST);\nif (process.env.K6_SECRET_SOURCE_URL_REQUESTS_BURST && burst <= 0) {\n  throw new Error('requestsBurst must be > 0');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set burst >= requestsPerMinuteLimit for smooth limiting","Guard computed burst values with Math.max(1, value)","Never copy 0-filled rate-limit blocks between configs"],"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"}