{"record":{"id":"e4de4e4df0e07875","repo":"thanos-io/thanos","slug":"not-ready-e4de4e","errorCode":null,"errorMessage":"Not ready","messagePattern":"Not ready","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/thanos/receive.go","lineNumber":405,"sourceCode":"\t\t\tStoreServer:          mts,\n\t\t\tWriteableStoreServer: webHandler,\n\t\t}\n\n\t\tinfoSrv := info.NewInfoServer(\n\t\t\tcomponent.Receive.String(),\n\t\t\tinfo.WithLabelSetFunc(func() []labelpb.ZLabelSet { return proxy.LabelSet() }),\n\t\t\tinfo.WithStoreInfoFunc(func() (*infopb.StoreInfo, error) {\n\t\t\t\tif httpProbe.IsReady() {\n\t\t\t\t\tminTime, maxTime := proxy.TimeRange()\n\t\t\t\t\treturn &infopb.StoreInfo{\n\t\t\t\t\t\tMinTime:                      minTime,\n\t\t\t\t\t\tMaxTime:                      maxTime,\n\t\t\t\t\t\tSupportsSharding:             true,\n\t\t\t\t\t\tSupportsWithoutReplicaLabels: true,\n\t\t\t\t\t\tTsdbInfos:                    proxy.TSDBInfos(),\n\t\t\t\t\t}, nil\n\t\t\t\t}\n\t\t\t\treturn nil, errors.New(\"Not ready\")\n\t\t\t}),\n\t\t\tinfo.WithExemplarsInfoFunc(),\n\t\t\tinfo.WithStatusInfoFunc(),\n\t\t)\n\n\t\tstatusSrv := status.NewServer(\n\t\t\tcomponent.Receive.String(),\n\t\t\tstatus.WithTSDBStatisticsGetter(\n\t\t\t\tstatus.TSDBStatisticsGetterFunc(func(limit int, matchers []storepb.LabelMatcher) (map[string]tsdb.Stats, error) {\n\t\t\t\t\tif !httpProbe.IsReady() {\n\t\t\t\t\t\treturn nil, errors.New(\"not ready\")\n\t\t\t\t\t}\n\n\t\t\t\t\tpromMatchers, err := storepb.MatchersToPromMatchers(matchers...)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, errors.Wrap(err, \"failed to convert matchers\")\n\t\t\t\t\t}\n","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L387-L423","documentation":"Receive's gRPC Info server provides a TSDB info function that checks whether the process is ready via httpProbe.IsReady(). If not ready, the RPC returns errors.New(\"Not ready\"). This is a transient readiness error served over gRPC while the receive component is still starting up (TSDBs not yet opened/registered) or shutting down.","triggerScenarios":"Calling the Info gRPC API on a thanos receive instance whose HTTP readiness probe has not yet reported ready — during startup, TSDB opening, or shutdown — from a querier/store client issuing Info requests.","commonSituations":"Querier discovery polls a freshly started receive pod before its readiness gate passes; load balancer sends Info RPCs to a not-yet-ready replica; extended TSDB head opening makes readiness take long.","solutions":["Retry the Info request with backoff; the error clears once the instance becomes ready.","Ensure clients (querier) exclude unready endpoints via readiness probes in Service/endpoints selection.","Check why readiness is delayed: TSDB opening time, blocked init, or failing /-/ready endpoint.","If it persists, inspect receive logs for startup failures blocking readiness."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"resp, err := checkReady(ctx, client) // GET /-/ready returns 200 only when ready","typeGuard":null,"tryCatchPattern":"var info *storepb.InfoResponse\nbackoff := 100 * time.Millisecond\nfor i := 0; i < 10; i++ {\n  info, err = client.Info(ctx, req)\n  if err == nil || !strings.Contains(err.Error(), \"Not ready\") { break }\n  time.Sleep(backoff)\n  backoff *= 2\n}","preventionTips":["Only send Info RPCs to endpoints passing the readiness probe","Use readinessProbe in Kubernetes so unready pods leave Service endpoints","Add exponential backoff for 'Not ready' gRPC errors","Monitor readiness duration to catch slow TSDB startup"],"tags":["grpc","readiness","startup","transient"],"backgroundTag":"service-not-ready","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"}