{"record":{"id":"e7a5270a3c6f4a50","repo":"grafana/k6","slug":"the-startvus-exceed-max-limit-of-d","errorCode":null,"errorMessage":"the startVUs exceed max limit of %d","messagePattern":"the startVUs exceed max limit of (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/executor/ramping_vus.go","lineNumber":751,"sourceCode":"\t\tcase <-ctx.Done():\n\t\t\treturn true\n\t\tdefault:\n\t\t\treturn false\n\t\t}\n\t}\n}\n\n// validateTargetShifts validates the VU Target shifts.\n// It will append an error for any VU target that is larger than the maximum value allowed.\n// Each Stage needs a Target value. The stages array can be empty. The Targes could be negative.\n//\n// TODO: after https://github.com/grafana/k6/issues/1499 this validation\n// function could be useless.\nfunc validateTargetShifts(startVUs int64, stages []Stage) []error {\n\tvar errors []error\n\n\tif startVUs > int64(maxConcurrentVUs) {\n\t\terrors = append(errors, fmt.Errorf(\n\t\t\t\"the startVUs exceed max limit of %d\", maxConcurrentVUs))\n\t}\n\n\tfor i := range stages {\n\t\tif stages[i].Target.Int64 > int64(maxConcurrentVUs) {\n\t\t\terrors = append(errors, fmt.Errorf(\n\t\t\t\t\"target for stage %d exceeds max limit of %d\", i+1, maxConcurrentVUs))\n\t\t}\n\t}\n\n\treturn errors\n}\n","sourceCodeStart":733,"sourceCodeEnd":764,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/lib/executor/ramping_vus.go#L733-L764","documentation":"Raised by validateTargetShifts (called from RampingVUsConfig.Validate) when startVUs exceeds maxConcurrentVUs, the hard internal cap on concurrently running VUs. This guards against configurations that could exhaust system resources.","triggerScenarios":"Thrown at lib/executor/ramping_vus.go:728 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lower startVUs to at most the maxConcurrentVUs limit","Distribute load across multiple scenarios or k6 instances instead of one huge VU count"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}