You can clone with
HTTPS or Subversion.
When the app is idle, it happens that the connection to MySQL server is lost and I have to restart it to make it work again.
This is the message in the error log
Error: Connection lost: The server closed the connection.
at Protocol.end (<project>\node_modules\mysql\lib\protocol\Protocol.js:78:13)
at Socket.onend (stream.js:79:10)
at Socket.EventEmitter.emit (events.js:117:20)
at process._tickDomainCallback (node.js:459:13)
I can't really reproduce the bug, but I'm sure about a couple of things:
We had a PR a while back that was supposed to have improved this situation: geddy/model#164
I believe the fix is only in master -- if it's a serious problem, we can look at cherry-picking it into the release branch.
I also encountered this issue - it locks up the server completely, forces restart :/
The fix for this has been pushed out to NPM -- model v0.5.7. Update your deps and you should pick up this fix. Let me know how it works for you.
the fix pushed to 0.5 branch doesn't compile (reconnectattempts undeclared)
(Probably a mistake in cherry-pick from edencore:master)
This means that current geddy 0.12.5 (depending on model 0.5.7) crashes with mysql adapter.
All this IMHO, i'm kind of newbie in GitHub and Geddy.
(fix in master looks ok https://github.com/geddy/model/blob/master/lib/adapters/sql/mysql.js)
Yes, probably bad conflict resolution from the cherry-pick. I've fixed this, added an actual test, and pushed it out to NPM, Model v0.5.8. Thanks for your patience.
Unfortunately the fix is unsuccessful. Same problem, after around 12+ hours of inactivity, mysql adapter faults same way when server closes the connection.
Actually, problem is not bound to inactivity. Even pinging DB every hour (through geddy/model obviously) doesnt' fix.
Any pointers? At the moment, I cannot keep my Geddy / MySQL server in production, it just keeps crashing.