{"action":"created","issue":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/113","labels_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/113/comments","events_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/113/events","html_url":"https://github.com/scality/ScalitySproxydSwift/issues/113","id":73309343,"number":113,"title":"ObjectController is instanciated twice","user":{"login":"JordanP","id":221981,"avatar_url":"https://avatars.githubusercontent.com/u/221981?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanP","html_url":"https://github.com/JordanP","followers_url":"https://api.github.com/users/JordanP/followers","following_url":"https://api.github.com/users/JordanP/following{/other_user}","gists_url":"https://api.github.com/users/JordanP/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanP/subscriptions","organizations_url":"https://api.github.com/users/JordanP/orgs","repos_url":"https://api.github.com/users/JordanP/repos","events_url":"https://api.github.com/users/JordanP/events{/privacy}","received_events_url":"https://api.github.com/users/JordanP/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T13:00:44Z","updated_at":"2015-06-12T09:44:43Z","closed_at":"2015-06-12T09:44:43Z","body":"OpenStack Swift instantiates a WSGI application (could be the proxy-server, object server) twice, the first time to give the app a chance to change dynamically the WSGI pipeline, and then the pipeline is created.\r\n\r\nCorresponding code is here : https://github.com/openstack/swift/blob/c77c79b2c9b9ca7790c29577341cf36c5e9012cf/swift/common/wsgi.py#L376\r\n\r\n A side effect is that an instance of the app is constructed twice.\r\n\r\nThis is an issue with our ObjectController which instantiates an SproxydClient that spawns a couple of healthcheck threads: we have twice the number of expected healthcheck threads.\r\n\r\nChanging our setup() method to remove its side effect is not simple because we need the SproxydClient to be instantiated early to give time to the Accrual Failure detector to collect data."},"comment":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/comments/111430953","html_url":"https://github.com/scality/ScalitySproxydSwift/issues/113#issuecomment-111430953","issue_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/113","id":111430953,"user":{"login":"JordanP","id":221981,"avatar_url":"https://avatars.githubusercontent.com/u/221981?v=3","gravatar_id":"","url":"https://api.github.com/users/JordanP","html_url":"https://github.com/JordanP","followers_url":"https://api.github.com/users/JordanP/followers","following_url":"https://api.github.com/users/JordanP/following{/other_user}","gists_url":"https://api.github.com/users/JordanP/gists{/gist_id}","starred_url":"https://api.github.com/users/JordanP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordanP/subscriptions","organizations_url":"https://api.github.com/users/JordanP/orgs","repos_url":"https://api.github.com/users/JordanP/repos","events_url":"https://api.github.com/users/JordanP/events{/privacy}","received_events_url":"https://api.github.com/users/JordanP/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T09:44:43Z","updated_at":"2015-06-12T09:44:43Z","body":"Fixed by #86 \r\n\r\nObjectController is still instantiated twice but the constructor has no side effect anymore, ie it doesn't spawn (green-thread"}}