Page MenuHomePhabricator

unrecognised network errors default to 50 minutes of retrying
Closed, ResolvedPublic

Description

In the event of a http issue of any kind, pywiki will retry 25 times by default, with a 2 minute delay, meaning a 50 minute wait until it returns to the command line unless the user interrupts the process with ^C.

Each retry it will print an exception.

In the case I am seeing now, the issue is a firewall preventing access to the wiki. The firewall immediately responds, so this is not a timeout, and 25 retries 2 minutes apart will not magically make the problem disappear.

WARNING: Waiting 120 seconds before retrying. ERROR: Traceback (most recent call last): File "..pywikibot/data/api.py", line 306, in submit body=paramstring) File "..pywikibot/comms/http.py", line 155, in request raise request.data error: ...

And at the end it will print a long traceback, ending with

File "..pywikibot/data/api.py", line 434, in wait
  raise TimeoutError("Maximum retries attempted without success.")

pywikibot.data.api.TimeoutError
<class 'pywikibot.data.api.TimeoutError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

The error need not have been a TimeoutError - all http errors are reported as a TimeoutError.

The http layer should differentiate real timeout errors from other errors that it can not fix (especially permanent errors like 403 being caused by a firewall).


Version: core-(2.0)
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=56963
https://bugzilla.wikimedia.org/show_bug.cgi?id=70754

Details

Reference
bz66063

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:26 AM
bzimport set Reference to bz66063.

The full traceback would probably be helpfull as well as any thin to reproduce it.

Change 137006 had a related patch set uploaded by John Vandenberg:
Bug 66063: raise urllib exception

https://gerrit.wikimedia.org/r/137006

Change 137009 had a related patch set uploaded by John Vandenberg:
Bug 66063: Disable git version network request

https://gerrit.wikimedia.org/r/137009

Change 137009 merged by jenkins-bot:
Bug 66063: Disable git version network request

https://gerrit.wikimedia.org/r/137009

Change 137006 had a related patch set uploaded by devunt:
Raise urllib exception when network error raised.

https://gerrit.wikimedia.org/r/137006

Change 137006 merged by jenkins-bot:
Raise urllib exception when network error raised.

https://gerrit.wikimedia.org/r/137006

Xqt lowered the priority of this task from Medium to Lowest.Dec 10 2018, 1:05 PM

Anything left to do here?

Xqt raised the priority of this task from Lowest to Low.Feb 3 2019, 12:25 PM
Xqt moved this task from Needs Review to Backlog on the Pywikibot board.
Xqt removed jayvdb as the assignee of this task.Feb 19 2020, 7:00 AM
Aklapper subscribed.

No reply; closing.