Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry to send request after receiving connection reset by peer. #175

Closed
wants to merge 1 commit into from
Closed

Retry to send request after receiving connection reset by peer. #175

wants to merge 1 commit into from

Conversation

ppluciennik
Copy link

Code tries twice to send request and fails after that.
Problem is observed while running ansible playbooks. Resending request helps.

@silencev
Copy link

how about giving a argument to specify try count?

Code tries twice to send request and fails after that.
Problem is observed while running ansible playbooks. Resending request helps.
@coveralls
Copy link

coveralls commented Aug 23, 2017

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling 90d3a40 on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling ca673ea on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

1 similar comment
@coveralls
Copy link

coveralls commented Aug 23, 2017

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling ca673ea on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

@coveralls
Copy link

coveralls commented Aug 23, 2017

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling 90d3a40 on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling 90d3a40 on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 66.667% when pulling 90d3a40 on ppluciennik:ppluciennik/crbp into b1a54bc on diyan:master.

@ppluciennik
Copy link
Author

@diyan: Is it feasible to integrate it soon?

@nitzmahone
Copy link
Collaborator

Blind retries at the send_message level can be extremely dangerous; you don't know if/how far the request got the way this is written right now. I know @dagwieers was playing with a much more targeted version of this behavior at one point and only doing it when it's known to be absolutely safe, but not sure where it stands. I'm going to close this one as a "no thanks" for now- might want to check with Dag about his stuff.

@nitzmahone nitzmahone closed this Dec 8, 2017
@nitzmahone
Copy link
Collaborator

Oh, it was the next one in the queue: #174

@dagwieers
Copy link
Contributor

dagwieers commented Dec 8, 2017

So my implementation is in #174 and currently has hard-coded retry count and sleep time. I would need advice on how we want to make this configurable.

We have been using this in production now, as it fixes a few corner-cases described in Ansible issue ansible/ansible#25532

Also, there may be certain HTTP errors with additional WinRM information indicating a retry would work, I remember we discussed this at AnsibleFest SF. I don't know if we have some more information related to this ?

@nitzmahone
Copy link
Collaborator

Potentially we will, if you're still hitting those- I plugged in a hacked-up version of the SOAP fault preservation code, so we'll know everything there is to know about 500s in 0.3.0.

@dagwieers
Copy link
Contributor

We isolated the various requests that can fail and can be retried, #174 now implements what is possible. Please try this for your existing use-cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants