There’s a joke in IT that you only know what’s broken, or at least needs fixing, when you go on leave. It has a habit of reminding you it… exists… in ways you’re not expecting.
This was my experience when we went to Vietnam: literally my first post from over there failed to build owing to an error:
Error: error copying static files: […] too many open files
At first I thought this was my own fault. The Friday Rule asserts that one should not push to production on a Friday afternoon lest it ruin your weekend, and The Holiday Rule applies this to leave. Naturally, I installed a fresh copy of macOS Sequoia on my MacBook Air before the trip, and took the opportunity to install new versions …
There’s a joke in IT that you only know what’s broken, or at least needs fixing, when you go on leave. It has a habit of reminding you it… exists… in ways you’re not expecting.
This was my experience when we went to Vietnam: literally my first post from over there failed to build owing to an error:
Error: error copying static files: […] too many open files
At first I thought this was my own fault. The Friday Rule asserts that one should not push to production on a Friday afternoon lest it ruin your weekend, and The Holiday Rule applies this to leave. Naturally, I installed a fresh copy of macOS Sequoia on my MacBook Air before the trip, and took the opportunity to install new versions of everything. I thought I tested Hugo before I left; evidently not. I tried earlier versions of Hugo though and came up with the same issue.
The nature of the error feels like an accomplishment; albeit a silly one. My blog now has such a massive archive of quality (cough) posts and associated metadata (tags, etc) that now the world’s most capable static site generator can’t handle it. Or specifically, the file system watcher it invokes can’t.
A Hugo forum thread suggests there might be an issue with kqueue. Hugo developer @bep suggested this workaround on a forum post discussing the issue last year, which fortunately worked for me:
$ hugo server --poll 1s
Interestingly, I can’t reproduce the error on my FreeBSD desktop with the same version, and as far I know that also uses kqueue like macOS. I might need to do some more digging.