{"action":"created","issue":{"url":"https://api.github.com/repos/jcoppieters/cody/issues/24","labels_url":"https://api.github.com/repos/jcoppieters/cody/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/jcoppieters/cody/issues/24/comments","events_url":"https://api.github.com/repos/jcoppieters/cody/issues/24/events","html_url":"https://github.com/jcoppieters/cody/issues/24","id":65130315,"number":24,"title":"Error: User.getUser failed with sql errors","user":{"login":"faktaochkunskap","id":11423841,"avatar_url":"https://avatars.githubusercontent.com/u/11423841?v=3","gravatar_id":"","url":"https://api.github.com/users/faktaochkunskap","html_url":"https://github.com/faktaochkunskap","followers_url":"https://api.github.com/users/faktaochkunskap/followers","following_url":"https://api.github.com/users/faktaochkunskap/following{/other_user}","gists_url":"https://api.github.com/users/faktaochkunskap/gists{/gist_id}","starred_url":"https://api.github.com/users/faktaochkunskap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faktaochkunskap/subscriptions","organizations_url":"https://api.github.com/users/faktaochkunskap/orgs","repos_url":"https://api.github.com/users/faktaochkunskap/repos","events_url":"https://api.github.com/users/faktaochkunskap/events{/privacy}","received_events_url":"https://api.github.com/users/faktaochkunskap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jcoppieters/cody/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-30T04:14:13Z","updated_at":"2015-04-30T17:22:51Z","closed_at":null,"body":"This is the second time I have this error. It seems to happen after a while. Under development I am using forever with no time settings. So maybe something has stopped running. The front-end is still working. \r\n\r\nIf I restart forever the problem is solved.\r\n\r\nError: User.getUser failed with sql errors\r\n   at Query._callback (/home/billgates/Dokument/ipro5/node_modules/cody/models/User.js:78:46)\r\n   at Query.Sequence.end (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)\r\n   at Protocol._validateEnqueue (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:218:6)\r\n   at Protocol._enqueue (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/protocol/Protocol.js:129:13)\r\n   at Connection.query (/home/billgates/Dokument/ipro5/node_modules/cody/node_modules/mysql/lib/Connection.js:185:25)\r\n   at Controller.query (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/Controller.js:404:19)\r\n   at Function.User.getUser (/home/billgates/Dokument/ipro5/node_modules/cody/models/User.js:77:16)\r\n   at Controller.LoginController.tryLogin (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/LoginController.js:90:13)\r\n   at Controller.LoginController.doRequest (/home/billgates/Dokument/ipro5/node_modules/cody/controllers/LoginController.js:50:10)\r\n   at Application.handToController (/home/billgates/Dokument/ipro5/node_modules/cody/apps/Application.js:308:14)"},"comment":{"url":"https://api.github.com/repos/jcoppieters/cody/issues/comments/97886693","html_url":"https://github.com/jcoppieters/cody/issues/24#issuecomment-97886693","issue_url":"https://api.github.com/repos/jcoppieters/cody/issues/24","id":97886693,"user":{"login":"jcoppieters","id":4351748,"avatar_url":"https://avatars.githubusercontent.com/u/4351748?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoppieters","html_url":"https://github.com/jcoppieters","followers_url":"https://api.github.com/users/jcoppieters/followers","following_url":"https://api.github.com/users/jcoppieters/following{/other_user}","gists_url":"https://api.github.com/users/jcoppieters/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoppieters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoppieters/subscriptions","organizations_url":"https://api.github.com/users/jcoppieters/orgs","repos_url":"https://api.github.com/users/jcoppieters/repos","events_url":"https://api.github.com/users/jcoppieters/events{/privacy}","received_events_url":"https://api.github.com/users/jcoppieters/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T17:22:51Z","updated_at":"2015-04-30T17:22:51Z","body":"Problem is solvable\r\n\r\n- easy: set longer timeout for mysql. It happens only on very very low traffic sites (no requests in more than a day). by setting a longer timeout, you can go up to 200days without a request. It is something the mysql user should do, we can't do it in Cody / node.js\r\n\r\n- normal: ping the mysql server once every 6 hours or so. (SetInterval ?)\r\n\r\n- hard: check if the socket to mysql is still open before every query. Feasable, but I think this should be done in the mysql-node implementation, not in Cody.\r\n"}}