{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/2538","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/2538/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/2538/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/2538/events","html_url":"https://github.com/balderdashy/sails/issues/2538","id":53617820,"number":2538,"title":"Sailsjs(~0.10.5) + Socket.io (0.9.14) + PM2 deploy with multi instances issue","user":{"login":"handleror","id":8380423,"avatar_url":"https://avatars.githubusercontent.com/u/8380423?v=3","gravatar_id":"","url":"https://api.github.com/users/handleror","html_url":"https://github.com/handleror","followers_url":"https://api.github.com/users/handleror/followers","following_url":"https://api.github.com/users/handleror/following{/other_user}","gists_url":"https://api.github.com/users/handleror/gists{/gist_id}","starred_url":"https://api.github.com/users/handleror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handleror/subscriptions","organizations_url":"https://api.github.com/users/handleror/orgs","repos_url":"https://api.github.com/users/handleror/repos","events_url":"https://api.github.com/users/handleror/events{/privacy}","received_events_url":"https://api.github.com/users/handleror/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-07T10:25:11Z","updated_at":"2015-05-26T20:15:45Z","closed_at":null,"body":"I have got a big issue when deploy sails code (0.10.5) with pm2 multi instances (>=2):\r\nSocket.emit always send multi times and raise:\r\n> [API-2 (err)] Error: Can't set headers after they are sent.\r\n> [API-2 (err)]   at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)\r\n\r\nI did see the problem in these links:\r\n[socket.io!](https://github.com/Automattic/socket.io/issues/1636)\r\n[pm2!](https://github.com/Unitech/PM2/issues/637) \r\n\r\nBut there is no way to upgrade socket.io in sails?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/105652704","html_url":"https://github.com/balderdashy/sails/issues/2538#issuecomment-105652704","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/2538","id":105652704,"user":{"login":"kaasdude","id":2759590,"avatar_url":"https://avatars.githubusercontent.com/u/2759590?v=3","gravatar_id":"","url":"https://api.github.com/users/kaasdude","html_url":"https://github.com/kaasdude","followers_url":"https://api.github.com/users/kaasdude/followers","following_url":"https://api.github.com/users/kaasdude/following{/other_user}","gists_url":"https://api.github.com/users/kaasdude/gists{/gist_id}","starred_url":"https://api.github.com/users/kaasdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaasdude/subscriptions","organizations_url":"https://api.github.com/users/kaasdude/orgs","repos_url":"https://api.github.com/users/kaasdude/repos","events_url":"https://api.github.com/users/kaasdude/events{/privacy}","received_events_url":"https://api.github.com/users/kaasdude/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T20:15:44Z","updated_at":"2015-05-26T20:15:44Z","body":"Sorry I didn't reply earlier, we stick to .10.latest because we needed to stay at socket.io version 0.9. This because we developed our mobile apps to connect with socket.io based on 0.9...\n\n\nSo maybe later, in a feature/upgrade session ;)\n\nThe problem also is that I'm involved in other projects, but when the moment arrives, I certainly wil migrate to 0.11+  \n\nThere is also the thing I submitted a ticket for, the Socket.io <=> redis relationship. Once this problem gets solved, we will will consider upgrading, see : https://github.com/balderdashy/sails/issues/2593\n\nRegards.\n\n\n\n> Op 26 mei 2015 om 16:19 heeft Courtney Wyrtzen <notifications@github.com> het volgende geschreven:\n> \n> Did v0.11 clear up the problem?\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}