{"action":"created","issue":{"url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/10","labels_url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/10/comments","events_url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/10/events","html_url":"https://github.com/lisa-lionheart/janus-server/issues/10","id":63146689,"number":10,"title":"Memory leak?","user":{"login":"sirkitree","id":28543,"avatar_url":"https://avatars.githubusercontent.com/u/28543?v=3","gravatar_id":"","url":"https://api.github.com/users/sirkitree","html_url":"https://github.com/sirkitree","followers_url":"https://api.github.com/users/sirkitree/followers","following_url":"https://api.github.com/users/sirkitree/following{/other_user}","gists_url":"https://api.github.com/users/sirkitree/gists{/gist_id}","starred_url":"https://api.github.com/users/sirkitree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirkitree/subscriptions","organizations_url":"https://api.github.com/users/sirkitree/orgs","repos_url":"https://api.github.com/users/sirkitree/repos","events_url":"https://api.github.com/users/sirkitree/events{/privacy}","received_events_url":"https://api.github.com/users/sirkitree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-20T03:02:12Z","updated_at":"2015-03-22T17:01:58Z","closed_at":null,"body":"The VR Sites server uses pm2 to run the server process. On a new start it takes up about 32MB of RAM but after a few hours we're into the 100's and after 8 hours 475MB.\r\n\r\nGoing to try https://github.com/marcominetti/node-memwatch when I have a chance to see if I can pinpoint the problem."},"comment":{"url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/comments/84654405","html_url":"https://github.com/lisa-lionheart/janus-server/issues/10#issuecomment-84654405","issue_url":"https://api.github.com/repos/lisa-lionheart/janus-server/issues/10","id":84654405,"user":{"login":"sirkitree","id":28543,"avatar_url":"https://avatars.githubusercontent.com/u/28543?v=3","gravatar_id":"","url":"https://api.github.com/users/sirkitree","html_url":"https://github.com/sirkitree","followers_url":"https://api.github.com/users/sirkitree/followers","following_url":"https://api.github.com/users/sirkitree/following{/other_user}","gists_url":"https://api.github.com/users/sirkitree/gists{/gist_id}","starred_url":"https://api.github.com/users/sirkitree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirkitree/subscriptions","organizations_url":"https://api.github.com/users/sirkitree/orgs","repos_url":"https://api.github.com/users/sirkitree/repos","events_url":"https://api.github.com/users/sirkitree/events{/privacy}","received_events_url":"https://api.github.com/users/sirkitree/received_events","type":"User","site_admin":false},"created_at":"2015-03-22T17:01:58Z","updated_at":"2015-03-22T17:01:58Z","body":"I'm getting results with node-inspector, but I'm not entirely sure what they mean or where to go from here. Here's what I've found:\r\n\r\nTaking a heap snapshot upon my initial client connection doesn't look too bad. But then I just take a spin around the lobby in the client and take another heap snapshot and the first thing I notice is a huge jump in the number of Objects.\r\n\r\n**Initial connection heap snapshot**\r\n![node inspector 2015-03-22 10-52-11](https://cloud.githubusercontent.com/assets/28543/6770295/8241f450-d081-11e4-966a-548f8ade89d6.png)\r\n\r\n**After a short stroll in the lobby**\r\n![node inspector 2015-03-22 10-52-39](https://cloud.githubusercontent.com/assets/28543/6770300/968a766c-d081-11e4-8bdf-d6dee7d4f073.png)\r\n\r\nThe `Objects Count` is fairly consistent between the two, around `4,800`, but in opening the `Object` in the second heap snapshot, I'm seeing `@543` at the top with a huge `Retained Size`.\r\n![node inspector 2015-03-22 11-00-51](https://cloud.githubusercontent.com/assets/28543/6770336/bc34ae04-d082-11e4-9f70-a156ca08e5c7.png)\r\n\r\nI'm not sure how else to read this other than the `global` scope is out of control.\r\n\r\nThoughts? I've very little experience with heap snapshots."}}