Closed eden-lane closed 10 years ago
This looks awesome, but it needs some sort of reconnection limit to make sure it doesn't keep trying to reconnect forever if something's really wrong. Just make sure it doesn't try to reconnect more than RECONNECT_TRIES_LIMIT within some reasonable span of time. (If you want to try it, you could use exponential backoff (http://en.wikipedia.org/wiki/Exponential_backoff) -- it's a pretty common way to handle this.)
Do we still need this? It looks like we already have a reconnection test for mysql.
Yeah, I've fixed this few month ago. Can't find that pull request, but it was merged.
I fixed that problem with disconnecting on idle timeout. My solution is based on official recomendation of node-mysql developers. I'm not sure that fix is necessary for Model, but you can decide it on you own.