bitovi / documentjs

The sophisticated documentation engine
https://documentjs.com/
MIT License
598 stars 382 forks source link

ENFILE: file table overflow #260

Open alexisabril opened 8 years ago

alexisabril commented 8 years ago

There's a possibility for DocumentJS to attempt to open too many files, resulting in the: Too many files open issue. This is specific for Macs, but I imagine the limit exists in all OSs. Reference: http://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1

Scenario: A project with a public folder and its own package.json. Eg: public/package.json and /package.json both exist. As a result, DocumentJS will attempt to document all node modules as well(assuming we've forgotten to add this path to the ignore option in document.js).

Note: This issue is for discussion as it may not be DocumentJS's responsibility. However, as this is a tool that easily can scan a large part of the filesystem, we may want to institute some safeguards.