node.js - Should I worry about File handles in logging from async methods? -


i'm using each() method of async lib , experiencing odd (and inconsistent) errors appear file handle errors when attempt log file within child processes.

the array i'm handing method has hundreds of items , i'm curious if node having trouble running out of available file handles tries log file within these simultaneous processes. problem goes away when comment out log calls, it's related somehow, i'm having tough time tracking down why.

all logging trying go single file... i'm entirely unclear on how works given each write (presumably) blocks, makes me wonder how these simultaneous processes able run independently if they're sitting around waiting on file become available write to.

assuming source of troubles, what's right way log process such asnyc.each() runs n number of processes @ once?

i think should have adjustable limit how many concurrent/outstanding write calls going do. no, none of them block, think async.eachlimit or async.queue give flexibility set limit low , sure things behave , gradually increase find out resource constraints bump against.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -