Connection Timed Out
DownBad tried to reach your server and heard nothing back before its time limit ran out. Usually something is quietly dropping the connection, or the server is too busy to answer. This page helps you find out which, fix it, and see the incident close.
What you’re seeing
Section titled “What you’re seeing”A server offers each of its services behind a numbered port: 443 for secure
web pages (https://), 80 for plain ones (http://), and other numbers for
anything else. An incident is open for a URL, port or SSL monitor, and it shows
one of these reasons.
On a URL monitor, with the failure type timeout:
Request timeout: timeout of 10000ms exceeded. The number is the monitor’s time limit in milliseconds: 10000 is 10 seconds.Request timeout: connect ETIMEDOUT 203.0.113.10:443.ETIMEDOUTis the error code for a connection attempt nothing answered, and the address and port after it are the ones DownBad tried to connect to.Request timeout: Unknown error occurred. This names nothing specific, but means the same: your name has more than one address, such as an IPv4 and an IPv6 one (the older and the newer kind of internet address), DownBad tried each, and the first timed out.
On a port monitor, with the failure type timeout:
Port connection timeout: Port 443 connection timed out to example.com
On an SSL monitor, with the failure type timeout. An SSL monitor tries again while its time allows, and the reason says how many attempts it made in all:
SSL connection timeout: Operation failed after 3 attempts. Last error: Connection timed outSSL connection timeout: Operation failed after 3 attempts. Last error: connect ETIMEDOUT 203.0.113.10:443SSL connection timeout: Operation failed after 3 attempts. Last error: AggregateError, which means the same as the first, for a name with more than one address.
Timed out means DownBad waited, and the connection never got as far as an
answer before its time limit. Usually nothing took the connection at all. For
an SSL monitor, or a URL monitor on an https:// address, it can also mean the
server took the connection but never finished setting up the secure connection
that comes next. It is different from a refused connection, where the server answers straight away that nothing is
listening; that has its own page,
Connection Refused. On a URL
monitor, the time limit covers the whole request: looking up the name,
connecting, and receiving the whole page. So a page that is too slow to arrive
reads the same as a connection nothing answered.
The page also covers reasons that say DownBad found no route to the address, meaning no path through the internet reaches it. The network says so at once instead of staying silent, but the fixes are the same as for a timeout:
connect EHOSTUNREACH 203.0.113.10:443 - Local (198.51.100.7:51234)andconnect ENETUNREACH 203.0.113.10:443 - Local (198.51.100.7:51234), on a URL monitor, with the failure type unknown.EHOSTUNREACHmeans no route to that one address,ENETUNREACHno route to the network it belongs to, and the address afterLocalis the one DownBad’s end of the connection used on its own network, not one to add to a firewall (software that decides which connections get through).Host unreachable: Cannot reach example.comandNetwork unreachable: Cannot reach network for example.com, on a port monitor, with the failure type network.SSL connection failed: Operation failed after 4 attempts. Last error: connect EHOSTUNREACH 203.0.113.10:443 - Local (198.51.100.7:51234)andSSL connection failed: Operation failed after 4 attempts. Last error: connect ENETUNREACH 203.0.113.10:443 - Local (198.51.100.7:51234), on an SSL monitor, with the failure type unknown.
Two reasons name nothing specific. They mean every address your name has failed, each in its own way, such as one that timed out and one with no route:
Unknown error occurred, on a URL monitor, with the failure type unknown.SSL connection failed: Operation failed after 4 attempts. Last error: AggregateError, on an SSL monitor, with the failure type unknown.
Is it you or us?
Section titled “Is it you or us?”It is almost always your server or the network in front of it. DownBad didn’t open this incident on one check, either. When a check fails, DownBad first checks again from up to three other places in the United States, and a timeout there counts as a failure too. It opens the incident only when at least half of the places that answered failed.
DownBad’s checks don’t come from fixed addresses. A firewall (software that decides which connections get through) that lets in only certain addresses turns them away, and there is no list of DownBad’s addresses to add to it.
The trap is testing from the wrong place. From the server itself, or from inside its own network, you can pass straight by a firewall that stands between it and the internet. So check from outside:
-
For a URL monitor, turn off Wi-Fi on your phone and open the address over mobile data. If the page keeps loading and never appears, the connection is timing out for you too.
-
For any monitor, run a free check from other countries at check-host.net. Enter your host name and port, such as
example.com:443. Each location’s result saysConnection timed outwhen nothing answers. -
Read the results:
- It times out from everywhere: your server really isn’t answering. Carry on below.
- It works from everywhere, and DownBad still times out: something may be treating DownBad differently, such as bot protection (a service that turns away visitors it takes for programs) or a firewall rule for certain countries. See Troubleshooting False Positives.
- It works from everywhere, and so does DownBad now: the problem has gone. Skip to Confirm DownBad sees the fix.
Check it yourself
Section titled “Check it yourself”These commands connect the way DownBad does. Run them from a computer outside
your server’s own network, such as your laptop, not from the server. They only
read, and change nothing. nc (netcat, a tool that opens a connection and
reports what happened) comes with macOS; on Ubuntu or Debian it is in the
netcat-openbsd package. curl, a tool that fetches a web page, comes with
macOS and Windows.
1. Find the host and port DownBad connects to. They depend on the kind of monitor:
- Port monitor: its Hostname and Port Number.
- SSL monitor: its Domain, and its Port, which is 443 unless you changed it.
- URL monitor: the name in its URL. The port is the number after the
colon, if there is one, so
https://example.com:8443/uses 8443. Otherwise it is 443 for an address that starts withhttps://, and 80 forhttp://.
The commands below use example.com and port 443. Put your host and port in
their place.
2. Try to connect to the port. On macOS and Linux, this waits up to 5 seconds for an answer from each of the name’s addresses:
nc -vz -G 5 example.com 443Connection to example.com port 443 [tcp/https] succeeded!example.com drops connections to port 81, so this example asked for that
port. nc tried each address this Mac could reach, example.com’s two IPv4
ones:
nc: connectx to example.com port 81 (tcp) failed: Operation timed outnc: connectx to example.com port 81 (tcp) failed: Operation timed outnc -vz -w 5 example.com 443Connection to example.com (172.66.147.243) 443 port [tcp/*] succeeded!example.com drops connections to port 81, so this example asked for that
port. nc tried each of the name’s four addresses. The two IPv4 ones timed
out. The two IPv6 ones say Network is unreachable: that is no route, from
a computer whose network had no IPv6.
nc: connect to example.com (172.66.147.243) port 81 (tcp) timed out: Operation now in progressnc: connect to example.com (104.20.23.154) port 81 (tcp) timed out: Operation now in progressnc: connect to example.com (2606:4700:10::ac42:93f3) port 81 (tcp) failed: Network is unreachablenc: connect to example.com (2606:4700:10::6814:179a) port 81 (tcp) failed: Network is unreachableTest-NetConnection example.com -Port 443 -InformationLevel DetailedTcpTestSucceeded : TrueMicrosoft doesn’t publish what this prints when the connection fails. Its
Remote Desktop troubleshooting guide
says TcpTestSucceeded reads False when the port can’t be reached, so
look for that line. It has no setting for how long to wait, so it can take
longer than 5 seconds to give up.
If it says Connection refused instead, the server answered straight away, and
the Connection Refused page is the
one to follow.
3. If it’s a URL monitor, ask for the page the way DownBad does. This sends DownBad’s user agent (the name a program gives a website when it asks for a page), follows up to five redirects (a page sending the visitor on to another address) as DownBad does, and gives up after 10 seconds, a monitor’s limit when its Timeout isn’t set. It prints the page’s status code (the number a website answers with, such as 200 for a page that loaded) and how many seconds the whole request took:
curl -sS -L --max-redirs 5 -m 10 -A "DownBad/1.0 (Uptime Monitor; +https://downbad.app/docs/resources/checker/)" -o /dev/null -w "%{http_code} %{time_total}\n" https://example.com/200 0.073234Against example.com port 81, which drops connections:
curl: (28) Connection timed out after 10008 milliseconds000 10.008061Against https://httpbin.org/delay/12, a test page that waits 12 seconds
before it answers:
curl: (28) Operation timed out after 10009 milliseconds with 0 bytes received000 10.009985curl -sS -L --max-redirs 5 -m 10 -A "DownBad/1.0 (Uptime Monitor; +https://downbad.app/docs/resources/checker/)" -o /dev/null -w "%{http_code} %{time_total}\n" https://example.com/200 0.178716Against example.com port 81, which drops connections:
curl: (28) Connection timed out after 10004 milliseconds000 10.004748Against https://httpbin.org/delay/12, a test page that waits 12 seconds
before it answers:
curl: (28) Operation timed out after 10004 milliseconds with 0 bytes received000 10.005002curl.exe -sS -L --max-redirs 5 -m 10 -A "DownBad/1.0 (Uptime Monitor; +https://downbad.app/docs/resources/checker/)" -o NUL -w "%{http_code} %{time_total}\n" https://example.com/Neither Microsoft nor curl publishes what this prints on Windows, so there
is no example here. It is the same curl as on the other systems: when it
works, it prints a status code such as 200 and the seconds it took. When
it fails, it prints an error starting curl: (28) and then 000.
(28) is curl’s code for running out of time, and 000 means no answer came
back. The two failures mean different things:
Connection timed out: the connection never finished setting up. For anhttp://address, that means nothing answered at all, and a firewall, a wrong address or a network outage is the likely cause. For anhttps://address it also covers a server that answered but never finished setting up the secure connection, which a busy server can do, so if step 2 connects, look at the busy server cause too.Operation timed out ... with 0 bytes received: the server took the connection, but didn’t send the page in time. A busy or slow server is the likely cause.- It works, but slowly: the time is close to 10 seconds, or to your monitor’s Timeout. The page is slow, and the monitor’s limit may be too short.
4. Look up the address your name points at. This uses nslookup, a
lookup tool that comes with macOS and Windows; on Ubuntu or Debian it is in the
dnsutils package. It asks 1.1.1.1, Cloudflare’s public DNS server, for
the addresses DNS (the Domain Name System, the internet’s address book)
gives your name. Your domain is the part of the name you registered, such
as example.com in shop.example.com:
nslookup example.com 1.1.1.1Server: 1.1.1.1Address: 1.1.1.1#53
Non-authoritative answer:Name: example.comAddress: 172.66.147.243Name: example.comAddress: 104.20.23.154example.com itself has addresses, so this example asked for
downbad-unregistered-7f3k2q.com, a domain nobody has registered:
Server: 1.1.1.1Address: 1.1.1.1#53
** server can't find downbad-unregistered-7f3k2q.com: NXDOMAINOn a Mac, nslookup lists only the IPv4 addresses. To see the IPv6 ones, ask for them:
nslookup -type=AAAA example.com 1.1.1.1Server: 1.1.1.1Address: 1.1.1.1#53
Non-authoritative answer:example.com has AAAA address 2606:4700:10::6814:179aexample.com has AAAA address 2606:4700:10::ac42:93f3
Authoritative answers can be found from:github.com has no IPv6 address, so this example asked for it; the lines
after the error are the domain’s settings, which you can ignore:
Server: 1.1.1.1Address: 1.1.1.1#53
Non-authoritative answer:*** Can't find github.com: No answernslookup example.com 1.1.1.1Server: 1.1.1.1Address: 1.1.1.1#53
Non-authoritative answer:Name: example.comAddress: 172.66.147.243Name: example.comAddress: 104.20.23.154Name: example.comAddress: 2606:4700:10::ac42:93f3Name: example.comAddress: 2606:4700:10::6814:179aexample.com itself has addresses, so this example asked for
downbad-unregistered-7f3k2q.com, a domain nobody has registered:
Server: 1.1.1.1Address: 1.1.1.1#53
** server can't find downbad-unregistered-7f3k2q.com: NXDOMAINnslookup example.com 1.1.1.1Microsoft’s
nslookup reference
gives this command but doesn’t publish what this prints. When it works, it
lists the name’s addresses. When the name doesn’t exist, it prints the
error the reference calls Nonexistent domain.
Compare the addresses with your server’s address, which your hosting provider’s dashboard shows. If the name doesn’t exist at all, follow Host Name Not Found instead.
Without a terminal: check-host.net runs step 2 from many countries in its
TCP check (TCP is the kind of
connection web pages and most services use), and step 3 in its
HTTP check (HTTP is how a browser asks
for a web page). Both say Connection timed out when nothing answered.
Google’s DNS lookup tool runs step
4: enter your name and choose A for its IPv4 addresses, then AAAA for
its IPv6 ones.
Fix it
Section titled “Fix it”The causes below run from most to least likely, so start with the first. If this monitor has never passed since you added it, a firewall, a wrong address or a timeout that is too short is more likely than a busy server or an outage.
Some steps happen in your hosting provider’s dashboard, and some on the server
itself, so you need to log in to it: with SSH (a way to open a terminal on
another computer), or through the console in your hosting provider’s dashboard.
A step that changes the server needs sudo on Linux, which runs a command
as the server’s administrator and asks for your password. Each such step says
so.
If someone else runs the server for you, such as a managed hosting company or a web agency, send them the reason the incident shows and a link to this page. The fix is theirs to make.
A firewall drops the connection
Section titled “A firewall drops the connection”A firewall is software that decides which connections get through. One set to drop a connection ignores it, so the connection just waits until it times out. This is the likely cause when step 2 of Check it yourself times out from outside, but the server is running and answers from inside its own network or from its own console.
There are often two firewalls: a cloud firewall in your hosting provider’s dashboard (on AWS, a security group), in front of the server, and one on the server itself. Check both.
-
In your hosting provider’s dashboard, open the firewall attached to the server and look for an inbound rule (a rule for connections coming in) that allows TCP (the kind of connection web pages and most services use) on the monitor’s port. Connections that no rule allows are dropped: DigitalOcean’s guide says “Traffic that does not match any rule is denied by default”, and Hetzner’s that “Any other connections will be dropped”. Your provider’s guide shows how to add a rule: AWS security groups, DigitalOcean and Hetzner.
-
For a public website or service, allow the port from anywhere:
0.0.0.0/0for IPv4 and::/0for IPv6. A rule that allows only certain addresses turns DownBad away, because its checks don’t come from fixed addresses. -
Then check the firewall on the server itself. On Ubuntu, it is usually ufw (Ubuntu’s tool for managing the firewall), and reading its rules needs
sudo:
Look in the settings of any firewall the Mac runs for a rule that turns away connections to the monitor’s port.
sudo ufw statusStatus: active
To Action From-- ------ ----443/tcp ALLOW Anywhere80/tcp ALLOW Anywhere443/tcp (v6) ALLOW Anywhere (v6)80/tcp (v6) ALLOW Anywhere (v6)Status: active
To Action From-- ------ ----443/tcp ALLOW Anywhere80/tcp DENY Anywhere443/tcp (v6) ALLOW Anywhere (v6)80/tcp (v6) DENY Anywhere (v6)A DENY rule for the monitor’s port drops DownBad’s checks. Servers without
ufw often have rules set straight in iptables, the firewall built into
Linux:
sudo iptables -L INPUT -n --line-numbersChain INPUT (policy ACCEPT)num target prot opt source destinationChain INPUT (policy ACCEPT)num target prot opt source destination1 DROP 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80A DROP line whose dpt: is the monitor’s port is what drops DownBad’s
checks. The number at the start of the line is the rule’s number.
Look in Windows Defender Firewall’s inbound rules for one that blocks connections to the monitor’s port. Microsoft’s guide shows where they are: open the Windows Firewall with Advanced Security console and select Inbound Rules, as in its steps for an inbound port rule.
- Open the port. This changes the server, so it needs
sudo. Put the monitor’s port in place of 80.
Change the setting in the firewall you found, so it allows connections to the monitor’s port.
With ufw, delete the DENY rule, then allow the port:
sudo ufw delete deny 80/tcpRule deletedRule deleted (v6)ERROR: You need to be root to run this scriptsudo ufw allow 80/tcpRule addedRule added (v6)ERROR: You need to be root to run this scriptWith iptables, delete the DROP rule by its number from the list. It
prints nothing when it works:
sudo iptables -D INPUT 1iptables v1.8.10 (nf_tables): Could not fetch rule set generation id: Permission denied (you must be root)More in Ubuntu’s ufw guide. On Fedora, Red Hat and similar systems, the firewall is usually firewalld, and its guide shows how to open a port.
Add an inbound rule that allows the port, as Microsoft’s guide to an inbound port rule shows, or turn off the rule that blocks it.
- Run step 2 of Check it yourself again from outside. It should now say the connection succeeded. Then follow Confirm DownBad sees the fix.
The server is too busy to answer
Section titled “The server is too busy to answer”This is the likely cause when step 3 of Check it yourself
says Operation timed out ... with 0 bytes received. It is also likely when
step 3 says Connection timed out for an https:// address while step 2
connects, when it works only some of the time, or when the monitor used to pass
and started timing out during a rush of visitors. The server takes the
connection, but is too busy to answer in time.
-
Look at how busy the server has been. Your hosting provider’s dashboard usually shows graphs of its CPU (the processor) and memory. Graphs that sit at their top for the time the incident has been open point to this cause.
-
Restart the web server or app, which often clears a program stuck on requests. This changes the server: a program run as a system service needs
sudoon Linux, and on Windows a PowerShell window (Windows’ command line) opened with Run as Administrator. The program’s own guide shows how to restart it: systemctl for a Linux service, nginx, Apache, Restart-Service on Windows, where IIS (Microsoft’s web server) runs as the serviceW3SVC, pm2 and Docker. -
If the server is busy every day, give it more capacity. Your provider’s guide shows how to move it to a larger size: DigitalOcean and AWS, for example.
-
If one page is slow even when the server is quiet, see Slow Response Times for how to find what holds it up.
-
Run step 3 of Check it yourself again. Its time should be well under the monitor’s Timeout. Then follow Confirm DownBad sees the fix.
DNS points at the wrong address
Section titled “DNS points at the wrong address”DNS keeps your domain’s details as records: an A record gives a name an
IPv4 address, and an AAAA record an IPv6 address. This is the likely cause
when the address in step 4 of Check it yourself, or the
one after ETIMEDOUT or EHOSTUNREACH in the incident’s reason, isn’t your
server’s. It often happens after moving to a new server, when the name still
points at the old one.
-
Find your server’s public address in your hosting provider’s dashboard.
-
Compare it with the addresses step 4 of Check it yourself lists. Check any IPv6 address as well as the IPv4 ones.
-
At your DNS host (the company where you manage your domain’s DNS records), change the wrong record to your server’s address, or delete an AAAA record for an IPv6 address the server doesn’t use. Your DNS host’s own guide shows where: Cloudflare, Amazon Route 53, GoDaddy, Namecheap, Squarespace and DigitalOcean.
-
DNS servers may keep the old address for as long as the record’s TTL (time to live, the number of seconds a DNS answer may be kept) allows. Your DNS host’s records page lists each record’s TTL. Wait that long, then run step 4 of Check it yourself again.
-
Once it lists only your server’s address, follow Confirm DownBad sees the fix.
Your hosting provider or its network is down
Section titled “Your hosting provider or its network is down”This is the likely cause when every check times out or finds no route, from everywhere, your own computer included, and you can’t log in to the server either. An outage at your hosting provider, or in the network it uses, stops every connection at once.
-
Check your provider’s status page for a reported problem in your server’s region: DigitalOcean, Hetzner, Linode and Cloudflare, for example. Your provider’s dashboard also shows whether the server is running.
-
If the provider reports an outage, there is nothing to change on your side. The incident closes by itself once DownBad’s checks pass again.
-
If the status page shows no problem, but the dashboard shows the server stopped, start it again from the dashboard. Your provider’s guide shows where: DigitalOcean’s shows its Turn On Droplet button, and AWS’s how to start an instance. If it is running but can’t be reached, contact your provider’s support with the reason the incident shows and when it started.
-
Once step 2 of Check it yourself succeeds from outside, follow Confirm DownBad sees the fix.
The monitor’s timeout is too short
Section titled “The monitor’s timeout is too short”This is the likely cause when step 3 of Check it yourself works, but the time it prints is close to or above the monitor’s time limit, so the page arrives, just slowly.
-
Open the monitor’s settings and find Timeout, under General Settings, in seconds. A monitor added when you signed up has no Timeout set and waits 10 seconds. In the monitor editor, a new URL or SSL monitor starts at 30, and a new port monitor at 10.
-
Set it comfortably above the time step 3 printed, and save the monitor. DownBad stops every check at 23 seconds, whatever the setting, so a Timeout above 23 acts as 23. The re-checks from other places wait at most 8 seconds.
-
If the page needs more than 23 seconds, no setting fixes it: make the page faster instead. See Slow Response Times.
-
Then follow Confirm DownBad sees the fix.
Confirm DownBad sees the fix
Section titled “Confirm DownBad sees the fix”-
Fix the cause first. A check that still fails while you work only adds to the time the incident takes to close.
-
Open the incident and press Test Now. DownBad checks again within a few seconds instead of waiting for the next scheduled check.
-
Wait a minute, then reload the incident page, which doesn’t update by itself. The incident closes by itself once enough checks in a row pass. You can’t close an incident by hand.
How many passing checks it takes. While an incident is open, DownBad checks less often after repeated failures. This is called back-off. Each failed check adds one step of back-off, up to 14. Each passing check takes one step away and asks for the next check straight away. When no steps are left, one more passing check closes the incident. So after a steady outage it takes one more passing check than there were failed checks while the incident was open, counting the one that opened it, and never more than 15.
These are the defaults. The monitor’s notification profile can change them for each monitor type under Backoff Config, and its settings are the ones that count: Recovery is how many passing checks in a row, with no back-off left, close the incident (2 by default, counting the check that takes the last step away), and Start after, Rate and Max interval decide when back-off starts and how far it goes. If the profile changes them, the step counts above and the waits below change with them.
How long that takes. After you press Test Now, those passing checks run back to back, a few seconds apart, so the incident usually closes within a minute. It takes longer when checks are slow to finish, such as a page that takes several seconds to load.
If you don’t press Test Now, the first passing check waits for the next scheduled one. With the default settings, from the third failed check on, DownBad waits 5 more minutes for each failure, up to an hour more than the monitor’s usual interval:
| Monitor checks every | After 1 or 2 failed checks | After 3 | After 6 | After 14 or more |
|---|---|---|---|---|
| 1 minute | 1 minute | 6 minutes | 21 minutes | 61 minutes |
| 5 minutes | 5 minutes | 10 minutes | 25 minutes | 65 minutes |
| 1 hour | 1 hour | 1 hour 5 minutes | 1 hour 20 minutes | 2 hours |
| 1 day | 1 day | 1 day 5 minutes | 1 day 20 minutes | 1 day 1 hour |
Still stuck
Section titled “Still stuck”Before you ask for help, collect:
- the link to the incident, and the reason it shows, word for word
- the output of the commands in Check it yourself, with the time you ran them and your time zone
- the link to your check-host.net results
- anything the steps on this page turned up, such as a firewall rule or a status page notice
Then send all of it to us through Contact Us.