-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
What version of Hugo are you using (hugo version
)?
latest
Does this issue reproduce with the latest release?
Yes, but there is condition to reproduce.
- need to set maximum number of open files to low for hitting error
too many open files
on during running hugo - run hugo serve without setting the poll interval
The issue is hit at:
hugo/watcher/filenotify/filenotify.go
Lines 25 to 30 in 5f3f608
func New(interval time.Duration) (FileWatcher, error) { | |
if watcher, err := NewEventWatcher(); err == nil { | |
return watcher, nil | |
} | |
return NewPollingWatcher(interval), nil | |
} |
if there is error return from below code with "too many open files":
if watcher, err := NewEventWatcher(); err == nil {
return watcher, nil
}
Then it will create NewPollingWatcher with interval = 0
NewPollingWatcher(interval), nil
And then it will panic with 0 as input:
https://github.com/golang/go/blob/c2397905e027cdbab3a28d02813adcb82368422c/src/time/tick.go#L24
This issue may be the same issue as #8744