New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: EMFILE, Too many open files #43
Comments
I fix similar error with replacing conn.end() by conn.destroy(), but I think this isn't good way. Also I try to use reverse callback order, but it doesn't matter. I specially disable DNS lookups in MySQL server to increase performance and switch to IP when connect to DB with node-mysql (for benchmarking node MySQL bindings). So it is interesting for me, is it a bug in node-mysql or in Node itself. |
I know it used to be a bug in Node itself, but it appears to have been resolved, though maybe this is proving to be an edge case. |
CrabDude: Are you sure that your mysql connections are going stale? If that's the case then it is a bug. I've explicitly added support for automatic re-connection in these scenarios. |
@felixge: I never verified, and unfortunately I am no longer on the project. It was something that would come up eventually every time which I resolved by merely letting the process die and be restarted by multi-node. Hopefully it was just something on my end. ;) |
Alright, I'll close this for now until I have a way to reproduce the problem. |
add tests for charset parameter on live connection
Connections often became stale and so as a result I was recreating / restarting connections before timeout to ensure freshness, over time the following error occurred:
20 Nov 20:15:01 - Error: EMFILE, Too many open files
at net:907:19
at Object.lookup (dns:138:5)
at Stream.connect (net:902:9)
at connect (/usr/local/lib/node/.npm/mysql/0.8.0/package/lib/mysql/client.js:79:16)
at Client._prequeue (/usr/local/lib/node/.npm/mysql/0.8.0/package/lib/mysql/client.js:245:3)
at Stream. (/usr/local/lib/node/.npm/mysql/0.8.0/package/lib/mysql/client.js:77:14)
at Stream.emit (events:27:15)
at IOWatcher.callback (net:471:53)
at node.js:772:9
Here is the code that was resetting the connection:
The text was updated successfully, but these errors were encountered: