I found following bug. It applies to alpha 2.0 node-mysql version. I also used connection pools (didn't check if problem exists without them).
When calling connect on persist object I never get errors even if database is not responding. There is synchronous connection creation in your code while proper way is to pass a callback. In fact callback is passed but only for logging purposes. I'm not sure this fix won't break anything but it seems to fix my problem.
I found following bug. It applies to alpha 2.0 node-mysql version. I also used connection pools (didn't check if problem exists without them). When calling connect on persist object I never get errors even if database is not responding. There is synchronous connection creation in your code while proper way is to pass a callback. In fact callback is passed but only for logging purposes. I'm not sure this fix won't break anything but it seems to fix my problem.