off by one notes, mostly

a bug that only happens on tuesdays

· 1 min

Work post.

For three weeks, one of our services crashed on Tuesday nights. Only Tuesdays. The whole team got superstitious. Jonas (more about Jonas some other time) started calling it der Dienstagsgeist, the Tuesday ghost.

We built theories. Weekly batch job. Some customer in a different time zone. A cron expression with a typo. Moon phase (Jonas).

Today we found it. A memory leak that takes about seven days to fill the heap. The service restarts on every deploy, and we deploy on Tuesdays, so a week later, Tuesday again. If we'd skipped one deploy it would have crashed on some random Thursday and nobody would have noticed anything.

Jonas is disappointed it wasn't the moon.