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

fixes bug 916886 - retry on ConnectionError on middleware #1517

Conversation

peterbe
Copy link
Contributor

@peterbe peterbe commented Sep 17, 2013

@rhelmer r?

cc @AdrianGaudebert

This means that when the webhead is unable to connect to the middleware it gets 10 attempts spread across 30 seconds to retry.

@@ -66,8 +66,21 @@ class SocorroCommon(object):
# default cache expiration time if applicable
cache_seconds = 60 * 60

# how many seconds to sleep when getting a ConnectionError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not put these in the config (just hardcode in base.py so people can override)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent idea!

@rhelmer
Copy link
Contributor

rhelmer commented Sep 17, 2013

r+ (assuming test passes) - code and test lgtm, and seems to run fine under normal operation. I wish it were not necessary though, odd that we get so many connection errors.

@peterbe
Copy link
Contributor Author

peterbe commented Sep 17, 2013

We don't really do logging in the django code but perhaps we should have a statsd metric specifically for counting how many and much this happens.

@peterbe
Copy link
Contributor Author

peterbe commented Sep 17, 2013

ea632cc

@peterbe peterbe closed this Sep 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants