Closed christianbundy closed 10 years ago
The kqueue issue does sound like a Node.js bug (or at least, limitation).
Have you tried just increasing your ulimit rather than using graceful-fs?
I've increased my ulimit, but it doesn't fix anything. I'll poke around and see if I can figure something else out.
To anyone reading this in the future, my solution was to concatenate my files into one file with 20,000 lines and read each individually. Not only does this fix the error, it's also much faster.
I'm sure this sounds ridiculous, but I'm opening, parsing, and closing 20,000 files asynchronously and having issues when my main() loop is slow. In the example below, I'm writing each of the files to MongoDB.
Should I be doing this differently, or is the kqueue error a bug? Thanks!