{"record":{"id":"28bf9a542480abc7","repo":"fatedier/frp","slug":"annotations-size-d-is-larger-than-limit-d","errorCode":null,"errorMessage":"annotations size %d is larger than limit %d","messagePattern":"annotations size (.+?) is larger than limit (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/v1/validation/proxy.go","lineNumber":269,"sourceCode":"\t\tfor _, msg := range validation.IsQualifiedName(strings.ToLower(k)) {\n\t\t\terrs = AppendError(errs, fmt.Errorf(\"annotation key %s is invalid: %s\", k, msg))\n\t\t}\n\t}\n\tif err := ValidateAnnotationsSize(annotations); err != nil {\n\t\terrs = AppendError(errs, err)\n\t}\n\treturn errs\n}\n\nconst TotalAnnotationSizeLimitB int = 256 * (1 << 10) // 256 kB\n\nfunc ValidateAnnotationsSize(annotations map[string]string) error {\n\tvar totalSize int64\n\tfor k, v := range annotations {\n\t\ttotalSize += (int64)(len(k)) + (int64)(len(v))\n\t}\n\tif totalSize > (int64)(TotalAnnotationSizeLimitB) {\n\t\treturn fmt.Errorf(\"annotations size %d is larger than limit %d\", totalSize, TotalAnnotationSizeLimitB)\n\t}\n\treturn nil\n}\n","sourceCodeStart":251,"sourceCodeEnd":273,"githubUrl":"https://github.com/fatedier/frp/blob/6c8a8d0a97d03b44e9528d30b30c70cb9d61b405/pkg/config/v1/validation/proxy.go#L251-L273","documentation":"Error \"annotations size %d is larger than limit %d\" thrown in fatedier/frp.","triggerScenarios":"Raised by ValidateAnnotations in pkg/config/v1/validation/proxy.go when the total serialized size of the annotations map exceeds the configured limit.","commonSituations":"Too many or too large annotations are attached to a proxy. Fix by removing unneeded annotations or shortening annotation values to stay under the limit.","solutions":["Remove or shorten annotations so the total size of all keys and values is not more than 256 kB.","Move large data out of annotations into the service behind the proxy."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c8a8d0a97d03b44e9528d30b30c70cb9d61b405","analyzedAt":"2026-08-15T06:53:27.215Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}