Skip to contentSkip to conversation

wget.py: use a longer timeout in checkstatus()

PATCH In review Alexander Kanavin 2 participants 3 messages Feb 9, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wget.py: use a longer timeout in checkstatus()

The addition of 30 second timeout is recent [1], and has proved not long enough with the AB server when mass-checking for sstate item availability, resulting in timeout errors with extensible SDKs[2].

[1]
https://git.yoctoproject.org/poky/commit/?id=2c46245f449d2716566ef668da0bf48f2109643a
[2]
https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/4710/steps/16/logs/stdio

---
 bitbake/lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/wget.py +1 -1
index 253cabce75..2a7592ae5f 100644
@@ -366,7 +366,7 @@ class Wget(FetchMethod):
                 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
                     pass
 
-                with opener.open(r, timeout=30) as response:
+                with opener.open(r, timeout=300) as response:
                     pass
             except urllib.error.URLError as e:
                 if try_again:
Signature · 1 line
2.20.1
#1 lore raw
Quoted 20 lines · Alexander Kanavin

The addition of 30 second timeout is recent [1], and has proved not long enough with the AB server when mass-checking for sstate item availability, resulting in timeout errors with extensible SDKs[2].

[1]
https://git.yoctoproject.org/poky/commit/?id=2c46245f449d2716566ef668da0bf48f2109643a
[2]
https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/4710/steps/16/logs/stdio

---
 bitbake/lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bitbake/lib/bb/fetch2/wget.py +0 -0
index 253cabce75..2a7592ae5f 100644

bitbake/lib/bb/fetch2/wget.py class Wget(FetchMethod): · line 372

Quoted 8 lines
bitbake/lib/bb/fetch2/wget.py +1 -1
@@ -366,7 +366,7 @@ class Wget(FetchMethod):
                 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
                     pass
 
-                with opener.open(r, timeout=30) as response:
+                with opener.open(r, timeout=300) as response:
                     pass
             except urllib.error.URLError as e:
                 if try_again:

We need to fix the servers. I doubt that at 300s it would work much better but the user experience would be horrible with builds hanging at startup for 5 minutes.

Cheers,

Richard

#2 lore raw
Quoted 3 lines · Richard Purdie

We need to fix the servers. I doubt that at 300s it would work much better but the user experience would be horrible with builds hanging at startup for 5 minutes.

The tracebacks are showing both straightforward timeouts, and timeouts while handling a server 503 error (presumably urllib has a built-in retry mechanism which is thwarted by the 30 sec timeout). I guess I mostly wanted to see if bumping the timeout value resolves those errors, and in at least in my a-full they did not show up.

Checking the server logs would be helpful: they probably do say something useful when issuing 503.

Alex