{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/help/issues/184","repository_url":"https://api.github.com/repos/nodejs/help","labels_url":"https://api.github.com/repos/nodejs/help/issues/184/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/help/issues/184/comments","events_url":"https://api.github.com/repos/nodejs/help/issues/184/events","html_url":"https://github.com/nodejs/help/issues/184","id":158165931,"number":184,"title":"RSS grows all the time, what is the cause?","user":{"login":"roman-io","id":9010086,"avatar_url":"https://avatars.githubusercontent.com/u/9010086?v=3","gravatar_id":"","url":"https://api.github.com/users/roman-io","html_url":"https://github.com/roman-io","followers_url":"https://api.github.com/users/roman-io/followers","following_url":"https://api.github.com/users/roman-io/following{/other_user}","gists_url":"https://api.github.com/users/roman-io/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-io/subscriptions","organizations_url":"https://api.github.com/users/roman-io/orgs","repos_url":"https://api.github.com/users/roman-io/repos","events_url":"https://api.github.com/users/roman-io/events{/privacy}","received_events_url":"https://api.github.com/users/roman-io/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-06-02T15:12:55Z","updated_at":"2016-06-15T11:11:30Z","closed_at":null,"body":"Node v4.4.4\r\nUbuntu LTS 14.04 3.13.0-86-generic\r\nE3, 4 cores, 16Gb Ram\r\n\r\nI have an issue with the service written in Node. It grows in memory and after it reaches the server memory limit, the process crashes with an error:\r\n```\r\nFATAL ERROR: Committing semi space failed. Allocation failed - process out of memory\r\n\r\n<--- Last few GCs --->\r\n\r\n37136896 ms: Mark-sweep 35.6 (5345832.9) -> 35.5 (5424623.9) MB, 445.4 / 0 ms [allocation failure] [GC in old space requested].\r\n37137314 ms: Mark-sweep 35.5 (5424624.9) -> 35.5 (5503415.9) MB, 412.8 / 3 ms [allocation failure] [GC in old space requested].\r\n37138040 ms: Mark-sweep 35.5 (5503416.9) -> 35.3 (5580419.9) MB, 641.8 / 0 ms [last resort gc].\r\n37138321 ms: Mark-sweep 35.3 (5580419.9) -> 34.6 (5651262.9) MB, 211.2 / 0 ms [last resort gc].\r\n```\r\nMemory logs shows:\r\nStared with: `Total: 61mb, Used: 35mb, RSS: 104mb`\r\nAfter ~30 minutes: `Total: 62mb, Used: 33mb, RSS: 903mb`\r\n\r\nThe total heap and used heap are staying the same, but the RSS grows up to 16GB and process crashes.\r\n\r\nIn memwatch-next, that I 'diffed' after 3 minutes of processing, I don't see anything wrong with my classes.\r\n\r\nHow I can solve this issue?\r\nThanks"},"comment":{"url":"https://api.github.com/repos/nodejs/help/issues/comments/226157387","html_url":"https://github.com/nodejs/help/issues/184#issuecomment-226157387","issue_url":"https://api.github.com/repos/nodejs/help/issues/184","id":226157387,"user":{"login":"roman-io","id":9010086,"avatar_url":"https://avatars.githubusercontent.com/u/9010086?v=3","gravatar_id":"","url":"https://api.github.com/users/roman-io","html_url":"https://github.com/roman-io","followers_url":"https://api.github.com/users/roman-io/followers","following_url":"https://api.github.com/users/roman-io/following{/other_user}","gists_url":"https://api.github.com/users/roman-io/gists{/gist_id}","starred_url":"https://api.github.com/users/roman-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman-io/subscriptions","organizations_url":"https://api.github.com/users/roman-io/orgs","repos_url":"https://api.github.com/users/roman-io/repos","events_url":"https://api.github.com/users/roman-io/events{/privacy}","received_events_url":"https://api.github.com/users/roman-io/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T11:11:30Z","updated_at":"2016-06-15T11:11:30Z","body":"@chuangtim If you don't see it in the heap, it may mean that an external library is not running inside Node VM scope but embedded into the process leaks. For example, external C library calls. I just checked the few libraries my software is using that make such calls, and one of them was leaking.\r\n\r\n@bnoordhuis I have tried the heapdump, but it doesn't show signs of leak.\r\n\r\nYou can try to find the way to detect such leaks with this example:\r\n```\r\nvar Xsd = require('libxml-xsd'); // v0.5.1 leaks\r\nvar schema = [\r\n'<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>',\r\n'  <xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">',\r\n'    <xs:element name=\"test\" type=\"xs:string\" />',\r\n'  </xs:schema>'\r\n].join('');\r\nvar validator = Xsd.parse(schema);\r\n\r\nfor (var i = 0; i < 10000; i++) {\r\n        var temp = validator.validate('<test xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">Roman</test>');\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"roman-io"}}