Re: node clustered http server workers die with misleading error
Cosmere Infahm <infinicosm <at> ...> writes:
> > Probably an insufficiency unless demonstrated otherwise. Network> errors
happen, even on loopback devices.The return value is not being checked after the
line result = _open_osfhandle((intptr_t)file, flags);
> in fs.cIn my case the return value is -1 and errno is set to EMFILE ie I
encounter the Windows open file limit at the stream i/o level
> http://msdn.microsoft.com/en-us/library/6e3b887c%28v=vs.100%29.aspxC run-time
I/O now supports many
> more open files on Win32 platforms than in previous versions. Up to
> 2,048 files can be open simultaneously at the lowio level (that is, opened and
accessed by means of the _open, _read, _write, and so forth family of I/O
functions). Up to 512 files can be open simultaneously at the stdio level (that
is, opened and accessed by means of the fopen, fgetc, fputc, and so forth family
of functions). The limit of 512 open files at the stdio level can be increased
to a maximum of 2,048 by means of the _setmaxstdio function.
> Because stdio-level functions, such as fopen, are built on top of the lowio
> functions, the maximum of 2,048 is a hard upper limit for the number of
> simultaneously open files accessed through the C run-time library.
> How can apps avoid bumping into these limits? Can node automatically increase
this limit to the max allowed by the lowio level? Can node switch to using
Windows API alone?--
You discuss windows build here, but I'm sure there are limits in linux too.
Got same issue on Ubuntu 11.10 by running "ab -n20000 -c1000 <server>"
throw er; // Unhandled stream error in pipe.
Error: EMFILE, too many open files
It is fully reproducable in v0.6.10
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@...
To unsubscribe from this group, send email to
For more options, visit this group at