{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/118","labels_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/118/comments","events_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/118/events","html_url":"https://github.com/balderdashy/sails-mongo/issues/118","id":30040975,"number":118,"title":"[Feature Request] Auto-Reconnect","user":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/sails-mongo/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/balderdashy/sails-mongo/milestones/1","labels_url":"https://api.github.com/repos/balderdashy/sails-mongo/milestones/1/labels","id":588429,"number":1,"title":"Feature Requests","description":"","creator":{"login":"particlebanana","id":370260,"avatar_url":"https://avatars.githubusercontent.com/u/370260?v=3","gravatar_id":"","url":"https://api.github.com/users/particlebanana","html_url":"https://github.com/particlebanana","followers_url":"https://api.github.com/users/particlebanana/followers","following_url":"https://api.github.com/users/particlebanana/following{/other_user}","gists_url":"https://api.github.com/users/particlebanana/gists{/gist_id}","starred_url":"https://api.github.com/users/particlebanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/particlebanana/subscriptions","organizations_url":"https://api.github.com/users/particlebanana/orgs","repos_url":"https://api.github.com/users/particlebanana/repos","events_url":"https://api.github.com/users/particlebanana/events{/privacy}","received_events_url":"https://api.github.com/users/particlebanana/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":7,"state":"open","created_at":"2014-03-05T17:38:23Z","updated_at":"2014-08-02T23:38:56Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2014-03-24T14:47:09Z","updated_at":"2015-01-06T18:32:59Z","closed_at":null,"body":"Migrated from https://github.com/balderdashy/waterline/issues/342\r\n\r\nIt appears that all the Waterline connections are formed on startup of Sails, and if MongoDB restarts throughout the lifetime of the Sails service, then the DB connections will all fail (i.e. they will not re-connect even if MongoDB comes back up).\r\n\r\nThis is a big issue because occasionally MongoDB may need to be restarted (e.g. due to changes in config).\r\n\r\nIs there any way around this? We have written our own sails-mongo-multi adapter to allow our multi-tenant service to switch databases at run time based on each request. Perhaps I can add code to reconnect if I detect that the connection has been closed?"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/comments/68909373","html_url":"https://github.com/balderdashy/sails-mongo/issues/118#issuecomment-68909373","issue_url":"https://api.github.com/repos/balderdashy/sails-mongo/issues/118","id":68909373,"user":{"login":"Glavin001","id":1885333,"avatar_url":"https://avatars.githubusercontent.com/u/1885333?v=3","gravatar_id":"","url":"https://api.github.com/users/Glavin001","html_url":"https://github.com/Glavin001","followers_url":"https://api.github.com/users/Glavin001/followers","following_url":"https://api.github.com/users/Glavin001/following{/other_user}","gists_url":"https://api.github.com/users/Glavin001/gists{/gist_id}","starred_url":"https://api.github.com/users/Glavin001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Glavin001/subscriptions","organizations_url":"https://api.github.com/users/Glavin001/orgs","repos_url":"https://api.github.com/users/Glavin001/repos","events_url":"https://api.github.com/users/Glavin001/events{/privacy}","received_events_url":"https://api.github.com/users/Glavin001/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T18:32:58Z","updated_at":"2015-01-06T18:32:58Z","body":"+1 Any more information would be greatly appreciated. Auto-reconnecting is important."}}