{"action":"created","issue":{"url":"https://api.github.com/repos/benoitc/gunicorn/issues/1101","labels_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1101/labels{/name}","comments_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1101/comments","events_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1101/events","html_url":"https://github.com/benoitc/gunicorn/issues/1101","id":102461272,"number":1101,"title":"Problem stoping gunicorn when using PeriodicCallbacks in tornado (gunicorn 19.3.0)","user":{"login":"aurelianito","id":106638,"avatar_url":"https://avatars.githubusercontent.com/u/106638?v=3","gravatar_id":"","url":"https://api.github.com/users/aurelianito","html_url":"https://github.com/aurelianito","followers_url":"https://api.github.com/users/aurelianito/followers","following_url":"https://api.github.com/users/aurelianito/following{/other_user}","gists_url":"https://api.github.com/users/aurelianito/gists{/gist_id}","starred_url":"https://api.github.com/users/aurelianito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurelianito/subscriptions","organizations_url":"https://api.github.com/users/aurelianito/orgs","repos_url":"https://api.github.com/users/aurelianito/repos","events_url":"https://api.github.com/users/aurelianito/events{/privacy}","received_events_url":"https://api.github.com/users/aurelianito/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/benoitc/gunicorn/labels/Bug","name":"Bug","color":"e31c1c"},{"url":"https://api.github.com/repos/benoitc/gunicorn/labels/Feedback%20Requested","name":"Feedback Requested","color":"ffb114"},{"url":"https://api.github.com/repos/benoitc/gunicorn/labels/Investigation","name":"Investigation","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/benoitc/gunicorn/milestones/11","html_url":"https://github.com/benoitc/gunicorn/milestones/R19.4","labels_url":"https://api.github.com/repos/benoitc/gunicorn/milestones/11/labels","id":798234,"number":11,"title":"R19.4","description":"","creator":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=3","gravatar_id":"","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":13,"state":"open","created_at":"2014-09-22T13:34:54Z","updated_at":"2015-08-31T03:55:04Z","due_on":"2015-08-26T22:00:00Z","closed_at":null},"comments":27,"created_at":"2015-08-21T20:59:06Z","updated_at":"2015-11-05T22:41:40Z","closed_at":null,"body":"When a tornado application uses periodic callbacks it fails to stop the workers if it defines its own timeouts (including periodic callbacks).\r\n\r\nWe believe the offending code is in gunicorn/workers/gtornado.py:\r\n\r\n    def stop_ioloop(self):\r\n            if not self.ioloop._callbacks and len(self.ioloop._timeouts) <= 1: # Here! my periodic callback counts too!\r\n                self.ioloop.stop()\r\n\r\nThe check `len(self.ioloop._timeouts) <= 1` will never be true with my own periodic callback.\r\n\r\nThis issue was found in gunicorn 19.3.0\r\n"},"comment":{"url":"https://api.github.com/repos/benoitc/gunicorn/issues/comments/154219098","html_url":"https://github.com/benoitc/gunicorn/issues/1101#issuecomment-154219098","issue_url":"https://api.github.com/repos/benoitc/gunicorn/issues/1101","id":154219098,"user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T22:41:40Z","updated_at":"2015-11-05T22:41:40Z","body":"@klaussfreire I'm curious how it intercept shutdown now."}}