events.js:45 Error: EBADF, Bad file descriptor #1189
Comments
@acdha helped me tune my TCP stack to more aggressively reap connections, since I was getting close to a thousand on my small linode VPS ... so my problem was lower level than node. If you are curious I lowered both of these from 60 to 30:
|
What does this do? It would be really helpful if someone could create a guide with all these settings, including http agent settings etc. so that the rest of us do not need to experience such downtime ourselves when services get popular. |
Basically I did a netstat --tcp and noticed a lot of connections in TIME_WAIT. The number of connections grew and grew to about 1000 connections, and then I think I hit some practical system limit (eventhough ulimit said there was no limit, there is a practical limit). If anyone knows how to determine the limit it would be interesting to know how to do that. The sysctl commands basically lower the time that a connection will be kept alive, which causes connections in TIME_WAIT to be reaped sooner. I'm not sure that it completely fixed my problems, but at least node isn't getting a fatal exception for now. |
I think this is some system tuning issue and not anything to do w/ node, so I'm closing this ticket. |
I'm seeing this consistently with express 3 in both my dev and prod envs if I enable connect-session-mongo or express.static.
Issue is referenced above. I tried the suggestion above on my unix server but no luck. |
@slajax what was your solution? |
I have no idea. I can't remember it was a long time ago. I may have had to increase the ulimit? |
ok thank you! |
Just wondering if anyone has seen this error pop up intermittently when node is under load:
I haven't been able to reproduce it with a test. But have tried both trunk and v0.4 (stable). My app does use socket.io. Is this perhaps some limitation of my system? Can anyone recommend some ways I could help figure out what is going on here?
The text was updated successfully, but these errors were encountered: