{"record":{"id":"9b4525f765c1eb22","repo":"thanos-io/thanos","slug":"create-chunk-pool","errorCode":null,"errorMessage":"create chunk pool","messagePattern":"create chunk pool","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/store.go","lineNumber":420,"sourceCode":"\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}),\n\t\tstore.WithRegistry(reg),\n\t\tstore.WithIndexCache(indexCache),\n\t\tstore.WithMatchersCache(matchersCache),\n\t\tstore.WithQueryGate(queriesGate),\n\t\tstore.WithChunkPool(chunkPool),\n\t\tstore.WithFilterConfig(conf.filterConf),\n\t\tstore.WithChunkHashCalculation(true),","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/store.go#L402-L438","documentation":"Wraps the creation of the chunk pool that buffers chunk bytes served by the Thanos store gateway. It fires when the pool cannot be allocated (invalid size parameters derived from the rate-limit flags or exhausted memory), so no query can be served.","triggerScenarios":"Thrown at cmd/thanos/store.go:420 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check chunk pool size flags (max chunk pool bytes)","Ensure pool sizes are non-negative and sensible","Review memory limits of the host"],"exampleFix":null,"handlingStrategy":"try-catch","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"}