{"action":"created","issue":{"url":"https://api.github.com/repos/socketio/socket.io/issues/2083","repository_url":"https://api.github.com/repos/socketio/socket.io","labels_url":"https://api.github.com/repos/socketio/socket.io/issues/2083/labels{/name}","comments_url":"https://api.github.com/repos/socketio/socket.io/issues/2083/comments","events_url":"https://api.github.com/repos/socketio/socket.io/issues/2083/events","html_url":"https://github.com/socketio/socket.io/issues/2083","id":68625150,"number":2083,"title":"nginx proxy with socket.io","user":{"login":"hisune","id":7941669,"avatar_url":"https://avatars.githubusercontent.com/u/7941669?v=3","gravatar_id":"","url":"https://api.github.com/users/hisune","html_url":"https://github.com/hisune","followers_url":"https://api.github.com/users/hisune/followers","following_url":"https://api.github.com/users/hisune/following{/other_user}","gists_url":"https://api.github.com/users/hisune/gists{/gist_id}","starred_url":"https://api.github.com/users/hisune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hisune/subscriptions","organizations_url":"https://api.github.com/users/hisune/orgs","repos_url":"https://api.github.com/users/hisune/repos","events_url":"https://api.github.com/users/hisune/events{/privacy}","received_events_url":"https://api.github.com/users/hisune/received_events","type":"User","site_admin":false},"labels":[{"id":516855872,"url":"https://api.github.com/repos/socketio/socket.io/labels/Closed%20due%20to%20inactivity","name":"Closed due to inactivity","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-04-15T09:24:18Z","updated_at":"2017-01-12T15:48:06Z","closed_at":null,"body":"My nginx.conf(nginx 1.6.3):\n\n```\nupstream node_chats {\n    server 127.0.0.1:3000;\n    server 127.0.0.1:3001;\n}\nserver {\n    listen 10000;\n    server_name test.chat.com\n\n    # prevents 502 bad gateway error\n    large_client_header_buffers 8 32k;\n\n    location / {\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $http_host;\n        proxy_set_header X-NginX-Proxy true;\n\n        # prevents 502 bad gateway error\n        proxy_buffers 8 32k;\n        proxy_buffer_size 64k;\n\n        proxy_pass http://node_chats ;\n        proxy_redirect off;\n\n        # enables WS support\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection $connection_upgrade;\n    }\n}\n```\n\nWhen a client(socket.io 1.3.5) linked to nginx, at first it would not stop connect / disconnect, look's like:\n\n```\nclient 432953 connected socket id: L5LoSWbyFtNBKpDmAADX\nclient 432953 [disconnected] socket id: L5LoSWbyFtNBKpDmAADX\nclient 432953 connected socket id: BfbQbqeqOZfBjJ5TAADc\nclient 432953 [disconnected] socket id: BfbQbqeqOZfBjJ5TAADc\nclient 432953 connected socket id: xITlgV3QkZiZoxuTAADm\nclient 432953 [disconnected] socket id: xITlgV3QkZiZoxuTAADm\nclient 432953 [disconnected] socket id: Taane4Nr9-zVTrjkAADO\nclient 432953 [disconnected] socket id: Jz_El6Rf2OGKm3A6AADP\nclient 432953 [disconnected] socket id: 2uIcEfPYcBJUQScVAADQ\nclient 432953 [disconnected] socket id: MPLMhuFhGsjuCLGhAADS\n```\n\nAnd it will constantly switching between two servers, and after a few seconds, it will stay on one of the servers.How can I solve this problem?\n"},"comment":{"url":"https://api.github.com/repos/socketio/socket.io/issues/comments/272198404","html_url":"https://github.com/socketio/socket.io/issues/2083#issuecomment-272198404","issue_url":"https://api.github.com/repos/socketio/socket.io/issues/2083","id":272198404,"user":{"login":"darrachequesne","id":13031701,"avatar_url":"https://avatars.githubusercontent.com/u/13031701?v=3","gravatar_id":"","url":"https://api.github.com/users/darrachequesne","html_url":"https://github.com/darrachequesne","followers_url":"https://api.github.com/users/darrachequesne/followers","following_url":"https://api.github.com/users/darrachequesne/following{/other_user}","gists_url":"https://api.github.com/users/darrachequesne/gists{/gist_id}","starred_url":"https://api.github.com/users/darrachequesne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrachequesne/subscriptions","organizations_url":"https://api.github.com/users/darrachequesne/orgs","repos_url":"https://api.github.com/users/darrachequesne/repos","events_url":"https://api.github.com/users/darrachequesne/events{/privacy}","received_events_url":"https://api.github.com/users/darrachequesne/received_events","type":"User","site_admin":false},"created_at":"2017-01-12T15:48:06Z","updated_at":"2017-01-12T15:48:06Z","body":"That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a [fiddle](https://github.com/darrachequesne/socket.io-fiddle) reproducing the issue if possible)."}}
{"actor":{"display_login":"darrachequesne"}}