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

http client should limit the number of queued retries to 1 by default for the same url and request data #35

Open
opalmer opened this issue Apr 21, 2014 · 0 comments

Comments

@opalmer
Copy link
Member

opalmer commented Apr 21, 2014

In cases where an http request is being retried multiple times the request may end up being retried more than once. Meaning you could have a request that retries which spawns a retry which then spawns a retry, etc etc. This behavior does not always happen but when it does it's likely a problem in pyfarm.agent.http.core.client, more specifically inside of Request.retry we should be returning the existing request rather than a new one each time.

I found this bug while working with this bit of code:

def download_complete(response):

All you have to do to reproduce the problem is create POST an assignment with a job type that does not exist. If you let it run for a bit it will eventually complete but you can see it making the same request over and over again.

A solution to this may be to return a regular Deferred object in place of the request. Then we attach the callbacks for that deferred object to the single request. When the request completes you'd end up with the results propagating to the dummy deferred objects.

@opalmer opalmer added this to the 0.7.0 milestone Apr 21, 2014
@opalmer opalmer changed the title http client should limit the number of queued retries to 1 by default http client should limit the number of queued retries to 1 by default for the same url and request data Apr 21, 2014
@opalmer opalmer modified the milestones: 0.8.0, 0.7.0 May 15, 2014
@opalmer opalmer removed this from the 0.8.0 milestone Sep 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant