scenevr / server

:heart_eyes: Create multiuser 3d environments using html-like tags and javascript
http://www.scenevr.com/
BSD 3-Clause "New" or "Revised" License
144 stars 19 forks source link

Error: EMFILE, too many open files #25

Open bnolan opened 9 years ago

bnolan commented 9 years ago

Serving some scene-server scripts, and restarted the server a half dozen times then got this error:

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: EMFILE, too many open files 'scenes/pinterest-ristari-recycle-upcycle-etc.xml'
bnolan commented 9 years ago

From reading this, we're probably not closing the fs.watch statements, and it's them that's causing the out of file limit (only 256 concurrent handles on os x).

bnolan commented 9 years ago

Not such a big problem on windows / linux, but bad practise.