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

urllib2.URLError: <urlopen error [Errno 54] Connection reset by peer> #96

Closed
asmeurer opened this issue Feb 21, 2012 · 2 comments · Fixed by #101
Closed

urllib2.URLError: <urlopen error [Errno 54] Connection reset by peer> #96

asmeurer opened this issue Feb 21, 2012 · 2 comments · Fixed by #101

Comments

@asmeurer
Copy link
Member

I get this error about 50% of the time. I then have to restart the bot. It's perhaps related to #95, which is the same behavior.

/Users/aaronmeurer/.sympy/sympy-bot.conf
> Using /Users/aaronmeurer/.sympy/sympy-bot.conf
> Checking username and password ...
>     OK.
> Working directory: /var/folders/wc/dppcpmxs1tlb36nqcw853wkm0000gn/T/sympy-bot-tmpUikPsd
Traceback (most recent call last):
  File "./sympy-bot", line 337, in <module>
    main()
  File "./sympy-bot", line 130, in main
    review(n, options, username, password)
  File "./sympy-bot", line 258, in review
    pull = github_get_pull_request(config.repository, n)
  File "/Users/aaronmeurer/Documents/Python/sympy/sympy-bot/utils.py", line 121, in github_get_pull_request
    data = json.load(urlopen(url % n))
  File "/sw/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/sw/lib/python2.7/urllib2.py", line 394, in open
    response = self._open(req, data)
  File "/sw/lib/python2.7/urllib2.py", line 412, in _open
    '_open', req)
  File "/sw/lib/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/sw/lib/python2.7/urllib2.py", line 1199, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/sw/lib/python2.7/urllib2.py", line 1174, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [Errno 54] Connection reset by peer>
@asmeurer
Copy link
Member Author

asmeurer commented Mar 1, 2012

I think this might have something to do with running two instances of SymPy bot one right after another, so that one resets the other.

asmeurer added a commit to asmeurer/sympy-bot that referenced this issue Mar 11, 2012
This also changes all retries to use a doubled waiting scheme, where it waits
for 1 second, then 2 seconds, then 4 seconds, then 8 seconds, and so on.  This
is for example what GMail does.  This prevents us from DOSing the server.

The easiest way to test this is to disconnect yourself from the internet and
try to review a pull request.

Closes sympy#96.
@asmeurer
Copy link
Member Author

Hmm, I thought typing "Closes #96" in the commit message was supposed to automatically close the issue. Maybe I got the syntax wrong.

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

Successfully merging a pull request may close this issue.

1 participant