{"record":{"id":"1de9b3edcc2c51f5","repo":"thanos-io/thanos","slug":"max-concurrency-value-cannot-be-lower-than-0-got","errorCode":null,"errorMessage":"max concurrency value cannot be lower than 0 (got %v)","messagePattern":"max concurrency value cannot be lower than 0 \\(got (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/store.go","lineNumber":413,"sourceCode":"\tif err != nil {\n\t\treturn errors.Wrap(err, \"create parquet converted blocks filter\")\n\t}\n\tmetaFetcher, err := block.NewMetaFetcher(logger, conf.blockMetaFetchConcurrency, insBkt, blockLister, dataDir, extprom.WrapRegistererWithPrefix(\"thanos_\", reg),\n\t\t[]block.MetadataFilter{\n\t\t\tparquetConvertedBlocksFilter,\n\t\t\tblock.NewTimePartitionMetaFilter(conf.filterConf.MinTime, conf.filterConf.MaxTime),\n\t\t\tblock.NewLabelShardedMetaFilter(relabelConfig),\n\t\t\tblock.NewConsistencyDelayMetaFilter(logger, time.Duration(conf.consistencyDelay), extprom.WrapRegistererWithPrefix(\"thanos_\", reg)),\n\t\t\tignoreDeletionMarkFilter,\n\t\t\tblock.NewDeduplicateFilter(conf.blockMetaFetchConcurrency),\n\t\t})\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"meta fetcher\")\n\t}\n\n\t// Limit the concurrency on queries against the Thanos store.\n\tif conf.maxConcurrency < 0 {\n\t\treturn errors.Errorf(\"max concurrency value cannot be lower than 0 (got %v)\", conf.maxConcurrency)\n\t}\n\n\tqueriesGate := gate.New(extprom.WrapRegistererWithPrefix(\"thanos_bucket_store_series_\", reg), int(conf.maxConcurrency), gate.Queries)\n\n\tchunkPool, err := store.NewDefaultChunkBytesPool(uint64(conf.chunkPoolSize))\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"create chunk pool\")\n\t}\n\n\toptions := []store.BucketStoreOption{\n\t\tstore.WithLogger(logger),\n\t\tstore.WithRequestLoggerFunc(func(ctx context.Context, logger log.Logger) log.Logger {\n\t\t\treqID, ok := middleware.RequestIDFromContext(ctx)\n\t\t\tif ok {\n\t\t\t\treturn log.With(logger, \"request-id\", reqID)\n\t\t\t}\n\t\t\treturn logger\n\t\t}),","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/store.go#L395-L431","documentation":"A validation guard rejecting a negative --store.max-concurrency value before the query gate is created. Concurrency of 0 means unlimited, so a negative number is meaningless and indicates a misconfigured flag; the store refuses to start.","triggerScenarios":"Thrown at cmd/thanos/store.go:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the max concurrency flag to 0 or a positive number","Check startup scripts for negative values"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}