{"action":"opened","issue":{"url":"https://api.github.com/repos/nodesocket/quote-stream/issues/5","labels_url":"https://api.github.com/repos/nodesocket/quote-stream/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/nodesocket/quote-stream/issues/5/comments","events_url":"https://api.github.com/repos/nodesocket/quote-stream/issues/5/events","html_url":"https://github.com/nodesocket/quote-stream/issues/5","id":121843265,"number":5,"title":"error 141","user":{"login":"patidardhaval","id":16194133,"avatar_url":"https://avatars.githubusercontent.com/u/16194133?v=3","gravatar_id":"","url":"https://api.github.com/users/patidardhaval","html_url":"https://github.com/patidardhaval","followers_url":"https://api.github.com/users/patidardhaval/followers","following_url":"https://api.github.com/users/patidardhaval/following{/other_user}","gists_url":"https://api.github.com/users/patidardhaval/gists{/gist_id}","starred_url":"https://api.github.com/users/patidardhaval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patidardhaval/subscriptions","organizations_url":"https://api.github.com/users/patidardhaval/orgs","repos_url":"https://api.github.com/users/patidardhaval/repos","events_url":"https://api.github.com/users/patidardhaval/events{/privacy}","received_events_url":"https://api.github.com/users/patidardhaval/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-12T09:01:07Z","updated_at":"2015-12-12T09:01:07Z","closed_at":null,"body":"working fine with less then 15 connection \r\nafter 15 connection server stop with error events.js on 141\r\n\r\nvar PORT = 4000;\r\nvar FETCH_INTERVAL = 300;\r\nvar PRETTY_PRINT_JSON = true;\r\n\r\n///\r\n// START OF APPLICATION\r\n///\r\nvar express = require('express');\r\nvar http = require('http');\r\nvar io = require('socket.io');\r\n\r\nvar app = express();\r\nvar server = http.createServer(app);\r\nvar io = io.listen(server);\r\nio.set('log level', 1);\r\n\r\nserver.listen(PORT);\r\n\r\napp.get('/', function(req, res) {\r\n\tres.sendfile(__dirname + '/index.html');\r\n});\r\n\r\nio.sockets.on('connection', function(socket) {\r\n\tsocket.on('ticker', function(ticker) {\r\n\t\ttrack_ticker(socket, ticker);\r\n\t});\r\n});\r\n\r\nfunction track_ticker(socket, ticker) {\r\n\t//Run the first time immediately\r\n\tget_quote(socket, ticker);\r\n\t//Every N seconds\r\n\tvar timer = setInterval(function() {\r\n\t\tget_quote(socket, ticker)\r\n\t}, FETCH_INTERVAL);\r\n\tsocket.on('disconnect', function () {\r\n\t\tclearInterval(timer);\r\n\t});\r\n}\r\n\r\nfunction get_quote(p_socket, p_ticker) {\r\n\t\r\n\thttp.get({\r\n\t\t//host: 'www.google.com',\r\n\t\thost: 'localhost',\r\n\t\tport: 80,\r\n\t\t//path: '/webapp/info?client=ig&q=' + p_ticker\r\n\t\tpath: '/webapp/user/bhavjson.php?check=0&Ses_id=' + p_ticker\r\n\t}, function(response) {\r\n\t\tresponse.setEncoding('utf8');\r\n\t\tvar data = \"\";\r\n\t\t\t\t\t\r\n\t\tresponse.on('data', function(chunk) {\r\n\t\t\tdata += chunk;\r\n\t\t});\r\n\t\t\r\n\t\tresponse.on('end', function() {\r\n\t\t\t\r\n\t\t\tp_socket.emit('quote',data);\r\n\t\t\t\r\n\t\t});\r\n\t});\r\n}"}}