XX-net/XX-Net · error · Exception
time out
Error message
time out
What it means
Same deadline pattern as gae_proxy's download_file, but in launcher/download_modules.py: the module download loop computes time_left = timeout - elapsed and raises Exception('time out') once negative before the next read. It bounds the whole module archive download, used by download_unzip and the download_worker thread.
Source
Thrown at code/default/launcher/download_modules.py:41
if not req:
time.sleep(60)
continue
if req.status == 302:
url = req.headers[b"Location"]
continue
start_time = time.time()
timeout = 300
if req.chunked:
downloaded = 0
with open(filename, 'wb') as fp:
while True:
time_left = timeout - (time.time() - start_time)
if time_left < 0:
raise Exception("time out")
dat = req.read(timeout=time_left)
if not dat:
break
fp.write(dat)
downloaded += len(dat)
return True
else:
file_size = int(req.getheader(b'Content-Length', 0))
left = file_size
downloaded = 0
with open(filename, 'wb') as fp:
while True:
chunk_len = min(65536, left)
if not chunk_len:View on GitHub (pinned to cfa5bc17b6)
Solutions
- Retry the module download; check_update/download_worker will re-attempt on next run
- Increase the timeout passed to download_file / download_unzip
- Verify network to the download host (curl the module URL)
- Use a system proxy/mirror if GitHub is slow from your region
Defensive patterns
Strategy: retry
Try / catch
for attempt in range(3):
try:
download_unzip(module_url, module_path, timeout=600)
break
except Exception as e:
if 'time out' not in str(e) or attempt == 2:
raise
time.sleep(10) Prevention
- Scale timeout with module archive size
- Retry module downloads on next launcher run instead of failing hard
- Route through a proxy if the module host is slow from your region
When it happens
Trigger: download_file for a launcher module (e.g. a new module zip) when throughput is too low to finish within timeout, or the connection stalls mid-body.
Common situations: Slow GitHub/CDN access (common in censored regions), small timeout defaults, large module archives, proxy interference.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- time out
- get README fail:
- download xxnet zip fail:
- time out
- download size:%d, need size:%d, download fail.
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/fa5098dd5a9471e7.
Report an issue: GitHub.