On Thu, Oct 11, 2012 at 3:13 AM, Daniel Friedman <[email protected]> wrote: > Hey guys, > > I'm getting Error: EMFILE, too many open files on calling > process.memoryUsage(). > > I see there was an issue that was fixed in v0.6.14, however I'm on v0.8.8 > and still seeing it. > > There is a test for the bug in test/simple/test-memory-usage-emfile.js which > opens up 255 files and then tries to call process.memoryUsage() which seems > to pass. However, when I bump the number of files to say 1024 it fails. > Excerpt from the test: > >> while (files.length < 256) >> files.push(fs.openSync(__filename, 'r')); >> var r = process.memoryUsage(); > > > I was wondering what the significance of the 256 is? Unless I'm missing > something, or doing something wrong, it seems like there might still be an > issue. > > Side note, winston (logging library) uses this call when trying to handle > exceptions, causing it to fail and node to exit. So I'd be careful if you're > relying on that feature of the library. > > Dan
You didn't mention your operating system but if it's OS X, you need to completely log out and log in again for the ulimit change to become effective. The number 256 is not significant except in a programmer aesthetic sense. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
