substack/bouncy — Issue #23: Crash on file descriptor related error 
Author: mateodelnorte
Created: 2012-01-27 05:31:03+00:00
State: open

When fielding requests, bouncy crashes sporadically with the following error:

```
net.js:722
self.fd = socket(self.type);
^
Error: EMFILE, Too many open files
at net.js:722:19
at Object.lookup (dns.js:153:45)
at Socket.connect (net.js:716:20)
at Object.createConnection (net.js:265:5)
at /Users/matt/Development/vayafeliz.node/node_modules/bouncy/lib/parse_args.js:47:31
at /Users/matt/Development/vayafeliz.node/node_modules/bouncy/index.js:72:20
at /Users/matt/Development/vayafeliz.node/proxy.js:27:7
at IncomingMessage.onHeaders (/Users/matt/Development/vayafeliz.node/node_modules/bouncy/index.js:55:13)
at IncomingMessage.emit (events.js:64:17)
at Parser. (/Users/matt/Development/vayafeliz.node/node_modules/bouncy/node_modules/parsley/lib/modes.js:135:21)
```
This gist contains my bouncy proxy code:

https://gist.github.com/06d3df6d4665f1f13582