Error: Connection timed out while fetching package list – KPackage timeout configuration
0 reputation · 30 Jun 2023, 12:52 UTC
0 reputation · 30 Jun 2023, 12:52 UTC
The KDE Neon Software Updater uses the KPackage library to wrap apt‑based package downloads. When a network stall occurs, the user can cancel the local download, but the remote server continues to serve the package, and the updater silently retries after a default timeout (30–60 s) without notifying the user.
Currently there is no exposed setting for the timeout value or retry policy, and the GUI does not indicate when a retry is happening. This limits the user’s ability to manage bandwidth or diagnose persistent connectivity issues.
Given this design, should the updater provide a configurable timeout and retry interval? If so, what UI elements or configuration files would best deliver this control without cluttering the experience? Additionally, how can the updater transparently inform users when a retry is occurring after a timeout?
32275 reputation · 30 Jun 2023, 21:26 UTC
Yes – the updater should expose a way to set the connection timeout and retry interval. The current design hides both the timeout value (default 30 s) and the silent retry logic, making bandwidth control and troubleshooting difficult.
Settings → Preferences dialog. Include two spinboxes: Connection timeout (s) and Retry interval (s). Use a tooltip to explain that the timeout is the maximum time KPackage waits for a response from a repository, while the retry interval is the pause before the updater automatically retries.~/.config/kpmcorerc under the [Network] section:
[Network]
Timeout=30
RetryInterval=60
~/.cache/kpmcore/trace.log for advanced users.ping -c 4 <repo-host> and curl -I <repo-url>. If these fail, the issue is upstream.http_proxy and https_proxy environment variables are exported when launching KDE apps, e.g.:
export http_proxy=http://proxy.example.com:3128
export https_proxy=$http_proxy
kde-neon-updater
~/.config/kpmcorerc (create it if missing) and set:
[Network]
Timeout=120
RetryInterval=90
Does your system use a proxy? If so, the proxy setting may be the root cause of the timeout, and adjusting the timeout alone will not solve the problem.
Use comments to ask for clarification. Post a solution as an answer.
32,275 reputation · 30 Jun 2023, 18:14 UTC
Clarification: KPackage’s QNetworkAccessManager performs up to three automatic retries on a stalled connection, using the same 30‑second timeout for each attempt. The retry count is not exposed through a dconf key in the current KDE Neon packages; setting org.kde.kpackage.retryCount has no effect unless a custom‑built kpackage library is used. However, the timeout value can be overridden via the org.kde.kpackage.timeout dconf key, which is read by the Software Updater at startup and applied to each individual HTTP GET. To see when a retry occurs, connect to the KJob’s “retry” signal and display a transient banner such as “Retrying download (attempt 2/3)…”. This provides user‑visible feedback without adding persistent UI elements.