Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
EMFILE on process.memoryUsage()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Friedman  
View profile  
 More options Oct 10 2012, 9:13 pm
From: Daniel Friedman <dan...@ninjablocks.com>
Date: Wed, 10 Oct 2012 18:13:11 -0700 (PDT)
Local: Wed, Oct 10 2012 9:13 pm
Subject: EMFILE on process.memoryUsage()

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Noordhuis  
View profile  
 More options Oct 11 2012, 6:24 am
From: Ben Noordhuis <i...@bnoordhuis.nl>
Date: Thu, 11 Oct 2012 12:24:07 +0200
Local: Thurs, Oct 11 2012 6:24 am
Subject: Re: [nodejs] EMFILE on process.memoryUsage()

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fadrizul H  
View profile  
 More options Oct 11 2012, 9:21 am
From: Fadrizul H <fadri...@gmail.com>
Date: Thu, 11 Oct 2012 06:21:21 -0700
Local: Thurs, Oct 11 2012 9:21 am
Subject: RE: [nodejs] EMFILE on process.memoryUsage()

Increase yer ulimit

Sent from my Windows Phone
------------------------------
From: Daniel Friedman
Sent: 11/10/2012 6:17 PM
To: nodejs@googlegroups.com
Subject: [nodejs] EMFILE on process.memoryUsage()

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

--
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Friedman  
View profile  
 More options Oct 11 2012, 8:27 pm
From: Daniel Friedman <dan...@ninjablocks.com>
Date: Thu, 11 Oct 2012 17:27:33 -0700 (PDT)
Local: Thurs, Oct 11 2012 8:27 pm
Subject: Re: [nodejs] EMFILE on process.memoryUsage()

Seeing it on AWS's Linux Image, ulimit -n is 1024. I get the feeling
something must not be cleaning up after itself if there are 1024 open files
after a given period of time. I'll bump up the limit in the mean time.

Cheers,
Dan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »