looper icon indicating copy to clipboard operation
looper copied to clipboard

Too many open files

Open dokterbob opened this issue 7 years ago • 1 comments

It seems looper is opening more files than a default Mac setup likes. Perhaps we should consider increasing the open file limit as, for example, is done in go-ipfs: https://github.com/ipfs/go-ipfs/blob/a933b288b3cbe506067e45a1da34dd6559dc417b/cmd/ipfs/ulimit.go

However, weirdly enough ulimit -n 1024 does not seem to solve the issue.

$ looper
Looper 0.3.3 is watching your files
Type help for help.

2017/01/17 10:22:21 Error watching:  vendor/golang.org/x/sys/unix too many open files
2017/01/17 10:22:21 Error watching:  vendor/golang.org/x/sys/windows open vendor/golang.org/x/sys/windows: too many open files
2017/01/17 10:22:21 Error watching:  vendor/golang.org/x/sys/windows/registry too many open files
[...]
Watching path ./
Watching path links
Watching path persistence
Watching path redirect
Watching path testing
Watching path testing/assert
Watching path testing/request
Watching path vendor
Watching path vendor/github.com
[...]
go test ./links
2017/01/17 10:23:24 open /dev/null: too many open files
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x4063a16]

goroutine 1 [running]:
panic(0x40f65a0, 0xc42000c0c0)
        /usr/local/Cellar/go/1.7.4_1/libexec/src/runtime/panic.go:500 +0x1a1
github.com/nathany/looper/gat.Run.goTest(0x0, 0x0, 0xc42004bd28, 0x1, 0x1)
        /Users/drbob/gocode/src/github.com/nathany/looper/gat/run.go:60 +0x206
github.com/nathany/looper/gat.Run.RunOnChange(0x0, 0x0, 0xc42027cd20, 0x13)
        /Users/drbob/gocode/src/github.com/nathany/looper/gat/run.go:31 +0xf4
github.com/nathany/looper/gat.(*Run).RunOnChange(0xc42000c760, 0xc42027cd20, 0x13)
        <autogenerated>:2 +0x6f
main.EventLoop(0x418eae0, 0xc42000c760, 0xc42000c700)
        /Users/drbob/gocode/src/github.com/nathany/looper/looper.go:29 +0x1a7
main.main()
        /Users/drbob/gocode/src/github.com/nathany/looper/looper.go:58 +0x175

dokterbob avatar Jan 17 '17 10:01 dokterbob

Thanks for the report. This is an issue with the underlying fsnotify library and kqueue on macOS.

See https://github.com/fsnotify/fsnotify/issues/129

nathany avatar Jan 27 '17 04:01 nathany