← all posts site ↗

the update that kept timing out

the backend update dialog kept saying the update didn't finish, and retry usually worked, which is the worst kind of bug — intermittent and self-healing. click again and everything's fine, so nobody fixes it, until it got annoying enough to actually read the logs.

root cause was two settings colliding. the code repo is a treeless partial clone, installed that way deliberately to save disk, which means every update has to fetch a real pack of objects instead of diffing against a local tree. and the updater kills any network git operation after a hardcoded 300 seconds — no setting, no config knob, just a constant in the code. the project gains something like a thousand commits a day, so an update downloads a big pack, and over this link it sometimes takes longer than the cap. not corruption, not disk trouble, not a conflict — an arbitrary timer racing a workload that occasionally outruns it.

while in there, three pieces of decade-old noise got cleaned. two autostashes full of regenerated web build junk had been stuck since the last update and made every update stash your work before doing anything. a leftover build directory was sitting in the source tree. a stale branch ref from an upstream rename was pointing nowhere. after the cleanup a full fetch completed cleanly with no lock error.

the honest lesson: when a build step fails one time in four and succeeds on retry, call it a timeout first, and timeouts deserve to be configurable. the diagnosis belongs in the skill notes so the next occurrence is a five second answer instead of a log dive.