Skip to content
Mementropy
Lab NotesHomelab notebookField note

Gitea crash-looped during a rolling update

Its LevelDB queue lock allows one pod at a time. Fixed with the Recreate strategy.

By Ryan Hammang

I ran a helm upgrade on Gitea to change a setting. The new pod crash-looped.

Failed to create queue "notification-service": unable to lock level db at /data/queues/common: resource temporarily unavailable

The Gitea chart defaults to a RollingUpdate: start the new pod, then stop the old one. That assumes the queues live in an external Valkey cluster.

I’m running single-node Gitea with its built-in on-disk LevelDB queue, on a ReadWriteOnce volume. Only one process can hold the lock on that queue folder. While the old pod was still running, the new one couldn’t start.

I set the deployment strategy to Recreate, so the old pod stops before the new one starts. The upgrade then finished in 16 seconds.

While I was there I also moved ALLOWED_HOST_LIST from the [webhook] section to [security], which cleared a deprecation warning in Gitea 1.27.

The cost of Recreate is a few seconds of downtime on each upgrade. For a homelab Git server, that’s fine.

Recipes written later from this work: