nats-io/nats-server · error
UpdateConfig took %v
Error message
UpdateConfig took %v
What it means
A performance watchdog, not an error: fileStore.UpdateConfig took longer than 1 minute (logged via warn). Config updates lock the store and can trigger expensive limit enforcement/rebuilds, so this signals the operation is slow enough to matter for availability.
Source
Thrown at server/filestore.go:729
// First enable sync after every write, so that any inflight
// or subsequent write gets synced
fs.updateDurabilitySettingsLocked(1)
fs.mu.Unlock()
// Sync all dirty blocks, so that we no longer have to rely
// on the backing Raft WAL.
fs.syncBlocks()
fs.mu.RLock()
defer fs.mu.RUnlock()
return fs.werr
}
func (fs *fileStore) UpdateConfig(cfg *StreamConfig) error {
start := time.Now()
defer func() {
if took := time.Since(start); took > time.Minute {
fs.warn("UpdateConfig took %v", took.Round(time.Millisecond))
}
}()
if fs.isClosed() {
return ErrStoreClosed
}
if cfg.Name == _EMPTY_ {
return fmt.Errorf("name required")
}
if cfg.Storage != FileStorage {
return fmt.Errorf("fileStore requires file storage type in config")
}
if cfg.MaxMsgsPer < -1 {
cfg.MaxMsgsPer = -1
}
fs.mu.Lock()
new_cfg := FileStreamInfo{Created: fs.cfg.Created, StreamConfig: *cfg}View on GitHub (pinned to 3a66a489d2)
Solutions
- Reduce stream size or excessive limits (max msgs/bytes/subjects) that make enforcement slow
- Schedule config changes off-peak on very large streams
- Capture pprof profile during an update if the cause is unclear
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/filestore.go:729 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02).
Data as JSON: /api/errors/d4e78c72dc1bd5da.
Report an issue: GitHub.