How to Fix - Wget: Failed: Connection Timed Out
Last Updated :
23 Jul, 2025
In Linux, while downloading files using the wget command, encountering the "Wget: Failed: Connection Timed Out" error is common, often due to network instability, server unavailability, or firewall restrictions. To address this, adjusting timeout settings, implementing retry options, or utilizing mirrored servers can effectively mitigate connection timeout issues and ensure successful file downloads using wget.
How to Fix - Wget: Failed: Connection Timed Out
Below are the solutions to resolve the "Wget: Failed: Connection Timed Out" problem in the Linux Operating System.
Ways to Solve Wget: Failed: Connection Timed Out
Solution 1: Increase Timeout
Increasing the timeout with wget --timeout=seconds URL extends the duration wget waits for a response from the server before timing out. This solution is effective when slow or unstable network connections cause connection timeouts during downloads. Adjusting the timeout value allows wget to wait longer for the server to respond, reducing the likelihood of the "Connection Timed Out" error.
Syntax:
wget --timeout=seconds URL
Example:
wget --timeout=10 https://media.geeksforgeeks.org/wp-content/uploads/20240406144401/2-min.png
Output:
Increase TimeoutSolution 2: Retry Option
Using the retry option with wget --tries=num URL specifies the number of times wget should retry the connection if it times out initially. This approach is helpful in dealing with intermittent network issues or temporary server unavailability, increasing the chances of a successful download by making multiple connection attempts.
Syntax:
wget --tries=num URL
Example:
wget --tries=3 https://media.geeksforgeeks.org/wp-content/uploads/20240406144401/2-min.png
Output:
Retry OptionSolution 3: Use a Mirror
Utilizing a mirror with wget --tries=num --mirror URL allows wget to download from a mirrored server if the primary server experiences connectivity issues. Mirrors can provide alternative routes to access the content, reducing the likelihood of connection timeouts and improving download reliability.
Syntax:
wget --tries=num --mirror URL
Example:
wget --tries=3 --mirror https://media.geeksforgeeks.org/wp-content/uploads/20240406144401/2-min.png
Output:
Use a MirrorConclusion
In conclusion, addressing "Wget: Failed: Connection Timed Out" errors in Linux involves adjusting timeout settings, retrying connections, or utilizing mirrored servers with wget commands. These solutions help mitigate network instability, server unavailability, and firewall restrictions, ensuring successful file downloads despite connection timeout issues.
Similar Reads
How To Fix The Err_Connection_Timed_Out Ðrror There is nothing more frustrating than racing against a deadline when every second counts and that moment from out of nowhere you see the ERR-CONNECTION-TIMED-OUT error on your Browser. Nowadays, the internet is an essential part of our lives, and when you see "ERR_CONNECTION_TIMED_OUT" in your brow
8 min read
How to fix Lost Connection to PostgreSQL during Query? The "Lost connection to PostgreSQL during query" error can be a challenging barrier when executing essential database operations. This error occurs when the link between the client software and the PostgreSQL server is prematurely aborted during query execution. Several factors can contribute to thi
5 min read
How to fix MariaDB Lost Connection During Query? The "Lost Connection During Query" error in MariaDB can disrupt database operations and lead to data loss or corruption. This error occurs when the communication between the database server and the client application is unexpectedly terminated. In this article, We will learn about different strategi
6 min read
How to Fix Error Code 2013 Lost Connection to MySQL? Encountering the "Error Code 2013: Lost connection to MySQL server" can be a frustrating experience for database users. This error typically occurs when the MySQL client loses connection to the server, leading to data retrieval or manipulation disruptions. In this article, we'll explore the causes o
6 min read
How To Fix âConnectionerror : Max retries exceeded with URLâ In Python? When the Python script fails to establish a connection with a web resource after a certain number of attempts, the error 'Connection error: Max retries exceeded with URL' occurs. It's often caused by issues like network problems, server unavailability, DNS errors, or request timeouts. In this articl
3 min read
How to Fix "Ssh: Connect To Host 'Hostname' Port 22: Connection Timed Out" SSH (Secure Shell) is a widely used protocol that provides secure and encrypted communication for accessing and managing remote servers. With robust encryption mechanisms, SSH allows users to connect securely over unsecured networks, run commands, transfer files, and manage services remotely. Howeve
6 min read