{"action":"created","issue":{"url":"https://api.github.com/repos/prerender/prerender/issues/221","labels_url":"https://api.github.com/repos/prerender/prerender/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/prerender/prerender/issues/221/comments","events_url":"https://api.github.com/repos/prerender/prerender/issues/221/events","html_url":"https://github.com/prerender/prerender/issues/221","id":102139146,"number":221,"title":"PHANTOM_WORKER_ITERATIONS affect the frequency of collapse","user":{"login":"zhangfengGH","id":10389637,"avatar_url":"https://avatars.githubusercontent.com/u/10389637?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangfengGH","html_url":"https://github.com/zhangfengGH","followers_url":"https://api.github.com/users/zhangfengGH/followers","following_url":"https://api.github.com/users/zhangfengGH/following{/other_user}","gists_url":"https://api.github.com/users/zhangfengGH/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangfengGH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangfengGH/subscriptions","organizations_url":"https://api.github.com/users/zhangfengGH/orgs","repos_url":"https://api.github.com/users/zhangfengGH/repos","events_url":"https://api.github.com/users/zhangfengGH/events{/privacy}","received_events_url":"https://api.github.com/users/zhangfengGH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-20T13:30:26Z","updated_at":"2015-08-20T22:04:56Z","closed_at":null,"body":"Now,I kown the number of iterations is how long before we forcibly shut down PhantomJS to prevent the memory leak issue. when I visit the frequency of five times per second, all phantomjs will collapse together, and then restart together, which leads to the CPU occupancy rate is very high.\r\n.Another question, what I use is inMemoryHtmlCache, process not Shared cache? How to weigh the performance and stability?"},"comment":{"url":"https://api.github.com/repos/prerender/prerender/issues/comments/133192611","html_url":"https://github.com/prerender/prerender/issues/221#issuecomment-133192611","issue_url":"https://api.github.com/repos/prerender/prerender/issues/221","id":133192611,"user":{"login":"thoop","id":1259374,"avatar_url":"https://avatars.githubusercontent.com/u/1259374?v=3","gravatar_id":"","url":"https://api.github.com/users/thoop","html_url":"https://github.com/thoop","followers_url":"https://api.github.com/users/thoop/followers","following_url":"https://api.github.com/users/thoop/following{/other_user}","gists_url":"https://api.github.com/users/thoop/gists{/gist_id}","starred_url":"https://api.github.com/users/thoop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoop/subscriptions","organizations_url":"https://api.github.com/users/thoop/orgs","repos_url":"https://api.github.com/users/thoop/repos","events_url":"https://api.github.com/users/thoop/events{/privacy}","received_events_url":"https://api.github.com/users/thoop/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T22:04:56Z","updated_at":"2015-08-20T22:04:56Z","body":"5 URLs per second sounds like a little too much for PhantomJS to handle in our experience. If each URL takes 5 seconds to load then that means you would have an average of 25 pages loading at any given moment. We like to load balance across many machines to prevent those issues. The tree-kill module that we use kills phantomjs based on the worker pid. Are you seeing it kill all phantomjs instances at the same time?\r\n\r\nIf you need a cache across more than 1 worker, you shouldn't use the inMemoryHtmlCache. You should use a distributed cache like the S3 cache."}}