{"action":"created","issue":{"url":"https://api.github.com/repos/App-vNext/Polly/issues/77","repository_url":"https://api.github.com/repos/App-vNext/Polly","labels_url":"https://api.github.com/repos/App-vNext/Polly/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/App-vNext/Polly/issues/77/comments","events_url":"https://api.github.com/repos/App-vNext/Polly/issues/77/events","html_url":"https://github.com/App-vNext/Polly/issues/77","id":130655622,"number":77,"title":"Error Occurs When given timeout and he can  not Again Because the state does not allow Again What do I do?","user":{"login":"alvpaz","id":7883678,"avatar_url":"https://avatars.githubusercontent.com/u/7883678?v=3","gravatar_id":"","url":"https://api.github.com/users/alvpaz","html_url":"https://github.com/alvpaz","followers_url":"https://api.github.com/users/alvpaz/followers","following_url":"https://api.github.com/users/alvpaz/following{/other_user}","gists_url":"https://api.github.com/users/alvpaz/gists{/gist_id}","starred_url":"https://api.github.com/users/alvpaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvpaz/subscriptions","organizations_url":"https://api.github.com/users/alvpaz/orgs","repos_url":"https://api.github.com/users/alvpaz/repos","events_url":"https://api.github.com/users/alvpaz/events{/privacy}","received_events_url":"https://api.github.com/users/alvpaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-02T11:38:47Z","updated_at":"2016-02-02T18:33:48Z","closed_at":null,"body":"**Exception message**: \r\nSystem.TimeoutException : The opening operation was not completed within the allotted time limit of 00:05:00 . The time allocated for this operation may have been a part of a longer timeout . ---> System.TimeoutException : The socket transfer timed out after 00: 04: 59.9499950 . You have exceeded the time limit set in their association. The time allocated for this operation may have been a part of a longer timeout . ---> System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not answer properly after a period of time, or established connection failed\r\n\r\n**retry two**\r\nException message: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel **can not be used for communication because it is in Failed state**.\r\n\r\n```\r\nvar tentativas = 0;\r\n            var policy = Policy\r\n                .Handle<Exception>()\r\n                .Retry(3,\r\n                    (exception, retryCount, context) =>\r\n                    {\r\n                        Log.LogarErro(string.Format(\"{0} {1} \", messagemErro, tentativas++), exception);\r\n                    });\r\n            return policy;\r\n```"},"comment":{"url":"https://api.github.com/repos/App-vNext/Polly/issues/comments/178744837","html_url":"https://github.com/App-vNext/Polly/issues/77#issuecomment-178744837","issue_url":"https://api.github.com/repos/App-vNext/Polly/issues/77","id":178744837,"user":{"login":"joelhulen","id":5950304,"avatar_url":"https://avatars.githubusercontent.com/u/5950304?v=3","gravatar_id":"","url":"https://api.github.com/users/joelhulen","html_url":"https://github.com/joelhulen","followers_url":"https://api.github.com/users/joelhulen/followers","following_url":"https://api.github.com/users/joelhulen/following{/other_user}","gists_url":"https://api.github.com/users/joelhulen/gists{/gist_id}","starred_url":"https://api.github.com/users/joelhulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelhulen/subscriptions","organizations_url":"https://api.github.com/users/joelhulen/orgs","repos_url":"https://api.github.com/users/joelhulen/repos","events_url":"https://api.github.com/users/joelhulen/events{/privacy}","received_events_url":"https://api.github.com/users/joelhulen/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T18:33:48Z","updated_at":"2016-02-02T18:33:48Z","body":"@alvpaz Based on your errors, it appears as though you are connecting to a WCF endpoint, which is timing out. On the other hand, it could be that it is throwing some other exception, then timing out when the policy retries the request. Perhaps if this is the case, then the ServiceChannel object isn't reusable and you need to reset it somehow between retries.\r\n\r\nDo you still encounter this issue when you take Polly out of the picture?\r\n\r\nIf it only happens when using the retry policy, could you try modifying your policy to capture a more specific exception to perhaps determine the source problem?\r\n\r\nDo your logs reflect the timeout error, or does it show something else?\r\n\r\nFinally, could you create a very small sample project that reproduces this error?"}}