Error: EMFILE: Too many opened files... Can't serve ionic

We’ve been developing an app on Cloud9 using Ionic, and about half a day in our development came to a grinding holt due to:

Error: EMFILE: Too many opened files.
The watch process has exceed the default number of files to keep open.
You can change the default with the following command:

  ulimit -n 1000

In the command above, it's setting the default to watch a max of 1000 files.

We tried the suggestion in the error, but no dice.

I’m guessing the Ionic server is a node server leaning on file watching, and we’re blowing that limit, but why? Aren’t the watch processes flushed between stopping and starting the ionic server?

What’s going on in this case, and does anyone know how to resolve this?

Thanks!

No one at Ionic can repo this?

Just restart Cloud9 ide. Worked fine for me :wink:

I also got this error on my mac during testing.