{"record":{"id":"2313081661e5e06e","repo":"nats-io/nats-server","slug":"config-reload-not-supported-for-jetstream-max-memo","errorCode":null,"errorMessage":"config reload not supported for jetstream max memory and max store","messagePattern":"config reload not supported for jetstream max memory and max store","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/reload.go","lineNumber":1992,"sourceCode":"\t\t\tif add, del := diffProxiesTrustedKeys(old.Trusted, new.Trusted); len(add) > 0 || len(del) > 0 {\n\t\t\t\tdiffOpts = append(diffOpts, &proxiesReload{add: add, del: del})\n\t\t\t}\n\t\tdefault:\n\t\t\t// TODO(ik): Implement String() on those options to have a nice print.\n\t\t\t// %v is difficult to figure what's what, %+v print private fields and\n\t\t\t// would print passwords. Tried json.Marshal but it is too verbose for\n\t\t\t// the URL array.\n\n\t\t\t// Bail out if attempting to reload any unsupported options.\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for %s: old=%v, new=%v\",\n\t\t\t\tfield.Name, oldValue, newValue)\n\t\t}\n\t}\n\n\t// If not disabling JS but limits have changed then it is an error.\n\tif !disableJS {\n\t\tif jsMemLimitsChanged || jsFileLimitsChanged {\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for jetstream max memory and max store\")\n\t\t}\n\t\tif jsStoreDirChanged {\n\t\t\treturn nil, fmt.Errorf(\"config reload not supported for jetstream storage dir\")\n\t\t}\n\t}\n\n\treturn diffOpts, nil\n}\n\nfunc copyRemoteGWConfigsWithoutTLSConfig(current []*RemoteGatewayOpts) []*RemoteGatewayOpts {\n\tl := len(current)\n\tif l == 0 {\n\t\treturn nil\n\t}\n\trgws := make([]*RemoteGatewayOpts, 0, l)\n\tfor _, rcfg := range current {\n\t\tcp := *rcfg\n\t\tcp.TLSConfig = nil","sourceCodeStart":1974,"sourceCodeEnd":2010,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/reload.go#L1974-L2010","documentation":"Config reload (SIGHUP) rejects changes to JetStream max_memory and max_storage because these limits cannot be applied to a running JetStream instance; the generic option-diff fallback in the reload path catches the changed field and aborts the whole reload with the old and new values. Fired only when a reload actually changes these fields.","triggerScenarios":"Thrown at server/reload.go:1992 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Revert max_memory/max_storage in the config to their current runtime values and reload again","Restart the nats-server process to apply new JetStream memory/storage limits","Keep these fields in a separate config used only at initial startup"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}