Search code examples
macosdockerwercker

Wercker crashes on MacOS with PANIC too many open files


I'm running wercker.com on Mac OS. Once in a while wercker crashes with the following error message although the container keeps running:

PANIC dial tcp 192.168.99.100:2376: socket: too many open files
panic: (*logrus.Entry) (0x6bfa60,0xc8202ceb00)

goroutine 2101 [running]:
github.com/wercker/wercker/vendor/github.com/Sirupsen/logrus.(*Entry).log(0xc8202ceb00, 0x0, 0xc8203d87c0, 0x39)
    /gopath/src/github.com/wercker/wercker/vendor/github.com/Sirupsen/logrus/entry.go:103 +0x5fb
github.com/wercker/wercker/vendor/github.com/Sirupsen/logrus.(*Entry).Panic(0xc8202ceb00, 0xc8203ebd30, 0x1, 0x1)
    /gopath/src/github.com/wercker/wercker/vendor/github.com/Sirupsen/logrus/entry.go:148 +0x7c
github.com/wercker/wercker/docker.(*WatchStep).Execute.func5(0xc82037ba40, 0xc8202ceb40, 0xc820178640, 0xc82005cd60, 0xc820165800, 0x40, 0xc8203b5860, 0xc82010bce0, 0xc82037b8c0)
    /gopath/src/github.com/wercker/wercker/docker/watchstep.go:297 +0x723
created by github.com/wercker/wercker/docker.(*WatchStep).Execute
    /gopath/src/github.com/wercker/wercker/docker/watchstep.go:312 +0x91d

...

I'm running a Typescript Node.js app inside the container which is being restarted often via wercker's "internal/watch". Typescript is being compiled to JS outside of the container by the IDE, but all the files are shared with the container.

What is the best way to avoid this issue?


Solution

  • After setting the local file limits up, it's working.

    See: Is there a fix for the “Too many open files in system” error on OS X 10.7.1.