{"record":{"id":"fbf53a6d144be9c4","repo":"nats-io/nats-server","slug":"error-storing-entry-to-wal-v","errorCode":null,"errorMessage":"Error storing entry to WAL: %v","messagePattern":"Error storing entry to WAL: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":4819,"sourceCode":"\n\t\t// Setup our state for catching up.\n\t\tn.debug(\"AppendEntry did not match [%d:%d] with [%d:%d]\", ae.pterm, ae.pindex, n.pterm, n.pindex)\n\t\tinbox := n.createCatchup(ae)\n\t\tar := newAppendEntryResponse(n.pterm, n.pindex, n.id, false)\n\t\tn.Unlock()\n\t\tn.sendRPC(ae.reply, inbox, ar.encode(arbuf))\n\t\tarPool.Put(ar)\n\t\treturn\n\t}\n\nCONTINUE:\n\t// Save to our WAL if we have entries.\n\tif ae.shouldStore() {\n\t\t// Only store if an original which will have sub != nil\n\t\tif sub != nil {\n\t\t\tif err := n.storeToWAL(ae); err != nil {\n\t\t\t\tif err != ErrStoreClosed {\n\t\t\t\t\tn.warn(\"Error storing entry to WAL: %v\", err)\n\t\t\t\t}\n\t\t\t\tn.Unlock()\n\t\t\t\treturn\n\t\t\t}\n\t\t\tn.cachePendingEntry(ae)\n\t\t\tn.resetInitializing()\n\t\t} else {\n\t\t\t// This is a replay on startup so just take the appendEntry version.\n\t\t\tn.pterm = ae.term\n\t\t\tn.pindex = ae.pindex + 1\n\t\t}\n\t}\n\n\t// Check to see if we have any related entries to process here.\n\tfor _, e := range ae.entries {\n\t\tswitch e.Type {\n\t\tcase EntryLeaderTransfer:\n\t\t\t// Only process these if they are new, so no replays or catchups.","sourceCodeStart":4801,"sourceCodeEnd":4837,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L4801-L4837","documentation":"storeToWAL returned an error other than ErrStoreClosed while an append-entry follower was persisting a received entry. The write error was already recorded via setWriteErrLocked (which may shut the store down); the log surfaces it at the replication path.","triggerScenarios":"Thrown at server/raft.go:4819 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the recorded write error (disk full, I/O failure) on this node","Free disk space or repair storage, then restart to rejoin via catchup/snapshot","Monitor werr-driven shutdowns to catch failing disks early"],"exampleFix":null,"handlingStrategy":"fallback","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-08T10:18:20.063Z"}