{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/346","labels_url":"https://api.github.com/repos/Netflix/Hystrix/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/Hystrix/issues/346/comments","events_url":"https://api.github.com/repos/Netflix/Hystrix/issues/346/events","html_url":"https://github.com/Netflix/Hystrix/issues/346","id":50289893,"number":346,"title":"HystrixMetricsStreamServlet.destroy() not invoked until container timeout","user":{"login":"codependent","id":6399869,"avatar_url":"https://avatars.githubusercontent.com/u/6399869?v=3","gravatar_id":"","url":"https://api.github.com/users/codependent","html_url":"https://github.com/codependent","followers_url":"https://api.github.com/users/codependent/followers","following_url":"https://api.github.com/users/codependent/following{/other_user}","gists_url":"https://api.github.com/users/codependent/gists{/gist_id}","starred_url":"https://api.github.com/users/codependent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codependent/subscriptions","organizations_url":"https://api.github.com/users/codependent/orgs","repos_url":"https://api.github.com/users/codependent/repos","events_url":"https://api.github.com/users/codependent/events{/privacy}","received_events_url":"https://api.github.com/users/codependent/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Netflix/Hystrix/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Netflix/Hystrix/milestones/10","labels_url":"https://api.github.com/repos/Netflix/Hystrix/milestones/10/labels","id":909572,"number":10,"title":"1.4.0-RC6","description":"Next RC for 1.4.0.  Mostly bugfixes","creator":{"login":"mattrjacobs","id":205579,"avatar_url":"https://avatars.githubusercontent.com/u/205579?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrjacobs","html_url":"https://github.com/mattrjacobs","followers_url":"https://api.github.com/users/mattrjacobs/followers","following_url":"https://api.github.com/users/mattrjacobs/following{/other_user}","gists_url":"https://api.github.com/users/mattrjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrjacobs/subscriptions","organizations_url":"https://api.github.com/users/mattrjacobs/orgs","repos_url":"https://api.github.com/users/mattrjacobs/repos","events_url":"https://api.github.com/users/mattrjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/mattrjacobs/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":14,"state":"open","created_at":"2014-12-19T00:33:51Z","updated_at":"2015-01-07T20:10:23Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2014-11-27T13:11:15Z","updated_at":"2015-01-07T20:11:34Z","closed_at":null,"body":"__Scenario:__\r\n1. JEE App with hystrix + hystrix-metrix-event-stream (v1.3.18). \r\n2. Hystrix dashboard requesting data to the App.\r\n3. When we stop App in our server we see that the following loop doesn't stop: \r\n\r\n    HystrixMetricsStreamServlet.handleRequest(){\r\n    ...  \r\n       while (poller.isRunning() && !isDestroyed) {\r\n\r\nThe servlet's destroy() method is not called, thus **isDestroyed is not modified until timeout**. This makes sense since, according to the servlet spec: *void destroy() - Called by [...] This method is only called once all threads within the servlet's service method have exited or after a timeout period has passed.*\r\n\r\nThe problem is that since there is a running request, whenever we want to republish/stop our application, we have to wait 60 seconds until our container (Websphere Application Server 8) forces the destruction of the servlet."},"comment":{"url":"https://api.github.com/repos/Netflix/Hystrix/issues/comments/69083949","html_url":"https://github.com/Netflix/Hystrix/issues/346#issuecomment-69083949","issue_url":"https://api.github.com/repos/Netflix/Hystrix/issues/346","id":69083949,"user":{"login":"mattrjacobs","id":205579,"avatar_url":"https://avatars.githubusercontent.com/u/205579?v=3","gravatar_id":"","url":"https://api.github.com/users/mattrjacobs","html_url":"https://github.com/mattrjacobs","followers_url":"https://api.github.com/users/mattrjacobs/followers","following_url":"https://api.github.com/users/mattrjacobs/following{/other_user}","gists_url":"https://api.github.com/users/mattrjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrjacobs/subscriptions","organizations_url":"https://api.github.com/users/mattrjacobs/orgs","repos_url":"https://api.github.com/users/mattrjacobs/repos","events_url":"https://api.github.com/users/mattrjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/mattrjacobs/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T20:11:34Z","updated_at":"2015-01-07T20:11:34Z","body":"Moving this out of RC6.  I'm happy to merge in a PR from someone who experiences this issue, but don't have enough context to work on it myself."}}