Built-in download engine stalls on mirror/CDN sites - needs read timeout and range retry
Author: xslcmtvCreated Jul 15, 2026Updated Jul 15, 2026
System Info
- GPT4All: 3.10.0 (desktop)
- OS: Windows 11 (Build 26100)
- Network: hf-mirror.com (China mainland HuggingFace mirror)
Reproduction
- Open GPT4All → Discover Models
- Download any model (e.g., Qwen2-1.5B-Instruct)
- Observe: download starts but stalls indefinitely after a few MB
Root Cause Analysis
The built-in download engine lacks a read timeout on the HTTP connection. When downloading from mirror/CDN sites (like hf-mirror.com), the server may stop sending data mid-stream without closing the TCP connection. The download engine waits forever with no progress.
Workaround: Clicking "Cancel" then "Resume" unblocks it by sending an HTTP Range request, creating a fresh connection that works again — until the next stall.
Expected Behavior
- Implement socket read timeout (e.g., 30s) — if no data received, close and retry with Range.
- Use HTTP Range retry automatically on timeout, instead of requiring manual Cancel/Resume.
- Ideally: multi-threaded segmented download + automatic retry.
Notes
Qt's QNetworkAccessManager supports read timeout via setTransferTimeout(), so this should be a straightforward fix.
Source: nomic-ai/gpt4all