{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/47","labels_url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/47/comments","events_url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/47/events","html_url":"https://github.com/jenkinsci/build-timeout-plugin/pull/47","id":117585535,"number":47,"title":"[FIXED JENKINS-31627] canceled TimerTasks should be purged.","user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-18T13:21:51Z","updated_at":"2015-11-18T13:47:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/pulls/47","html_url":"https://github.com/jenkinsci/build-timeout-plugin/pull/47","diff_url":"https://github.com/jenkinsci/build-timeout-plugin/pull/47.diff","patch_url":"https://github.com/jenkinsci/build-timeout-plugin/pull/47.patch"},"body":"The `TimerTask` could be way off into the future as it is user input that\r\ndecides when this is run (and or jobs running multiple days the inactivity\r\ncould be 1 day).  Without purging the `Timer` the `TimerTask`s stay into the\r\nqueue until such time that they are the next task to run - at which time\r\nthey are removed.  But with all other triggers in a system (polling every\r\nminute etc) added timers could stay for their maximum duration.\r\n\r\nFor arguments sake say this is 1 day and you have a build that produces\r\n10000 lines of output every 10 hours and uses the `NoActivity` strategy.\r\nIn this case for every call to write you will have a new `TimerTask` created\r\nthat should trigger in 24hours time - it is easy to see these 10000\r\n`TimerTask`s are referenced from the `Timer` and as such will not be garbage\r\ncollected for a long while.\r\nIf you have lots of these styles of jobs - the required heap to run this\r\nbecomes massive.\r\n\r\n@reviewbybees \r\n[JENKINS-31627](https://issues.jenkins-ci.org/browse/JENKINS-31627)"},"comment":{"url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/comments/157717884","html_url":"https://github.com/jenkinsci/build-timeout-plugin/pull/47#issuecomment-157717884","issue_url":"https://api.github.com/repos/jenkinsci/build-timeout-plugin/issues/47","id":157717884,"user":{"login":"jtnord","id":494726,"avatar_url":"https://avatars.githubusercontent.com/u/494726?v=3","gravatar_id":"","url":"https://api.github.com/users/jtnord","html_url":"https://github.com/jtnord","followers_url":"https://api.github.com/users/jtnord/followers","following_url":"https://api.github.com/users/jtnord/following{/other_user}","gists_url":"https://api.github.com/users/jtnord/gists{/gist_id}","starred_url":"https://api.github.com/users/jtnord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtnord/subscriptions","organizations_url":"https://api.github.com/users/jtnord/orgs","repos_url":"https://api.github.com/users/jtnord/repos","events_url":"https://api.github.com/users/jtnord/events{/privacy}","received_events_url":"https://api.github.com/users/jtnord/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T13:47:03Z","updated_at":"2015-11-18T13:47:03Z","body":"@reviewbybees done"}}