From time to time, you might encounter the ‘website took too long to respond’ error when you try to access a particular website.
The following images show how the error looks like on Chrome and Firefox respectively:
What does this error mean?
The ‘taking too long to respond’ error indicates that there is a communication problem between the target server and the client (your web browser). It means that the targeted server is taking a long time to send a response to the client. The error is usually sent if the client cannot get a response within 30 seconds. The connection attempt is then terminated.
What causes the ‘taking too long to respond’ error?
Internet connection problems
A particular website may fail to load if you do not have an internet connection. Check that your device is connected, for example, via a LAN or Wi-Fi. If you use a LAN, you need to check your LAN settings. You also need to make sure that your TCP/ipv4 protocols are correctly configured. We will look at how to fix internet connection problems later on in the article.
Your server is overwhelmed
If you are using shared hosting, there is a possibility that there is not enough memory to allow for a connection between your client and server. When using shared hosting, memory allocation is not equally distributed. There might be sites that use a lot of memory, leaving others with little memory available.
Talk to your service provider about your memory limit. If you are using WordPress, you can check your memory limit in the ‘Site Health Tool’ on your dashboard.
You may also want to change your hosting plan to a VPS (Virtual Private Server) package, where memory is shared equally among users.
Your antivirus is blocking site access
The DNS (Domain Name System) is what translates domain names to IP addresses. This is because it is easier for browsers to ‘read’ IP addresses (which are made up of 4 sets of digits separated by a period as in the image below), while it is easier for humans to remember text, which is why domain names are made up of text as in www.abc.com
DNS results are usually cached in order to make sure that subsequent requests are handled faster. If there was a communication problem between client and server, it may be cached, resulting in the ‘website took too long to respond’ error. Flushing the DNS cache should solve the error.
Extensions come in handy to add necessary features to help improve your browser’s functionality. However, they may not be as frequently updated for compatibility with web browsers. Outdated extensions may contribute to communication problems between client and server. You also cannot be sure that the extensions will work as intended.
Stored data from browsing sessions (saved passwords, cookies, site names, and URLs, as well as cache) can contribute to client-server communication problems. The stored data contains the name and URL of the particular site that you are trying to access. If it had connection issues before, it will refer to the browser history and the client-server connection will fail.
Chrome’s default profile folder issues
There is a folder named ‘Default’ on your local machine which store’s your ‘Chrome Profile’ (your bookmarks, saved passwords, apps, browser settings, and extensions). If there is corrupted content in the folder, it may affect communication between client and server. You may need to edit or rename this file in order to fix ‘taking too long’ issues.
Windows hosts file
The hosts file is what maps domains to IP addresses. If you want to see for example how your site would look if you hosted on a different server, you would need to edit the hosts file. If you have blocked website URLs or IP addresses in your hosts file, they might cause other sites to be blocked too, resulting in the page taking too long to load error.
The network adapter is not installed or is out of date
Drivers are necessary for seamless communication between software and hardware. If your network driver is not up to date, or if your device does not have one, it may result in broken client-server communication.
Your browser contains corrupted files
If you are using WordPress, your theme incompatibility issues could be the reason for the ‘taking too long to respond’ error. The only way to know whether it is your theme that is causing the issues is to change it to a default theme. If the error gets fixed, then you need to reinstall your theme or revert to the latest backup of your site that you have.
Too much data in your database
If your database contains a lot of data, for example, logs, hundreds or thousands of blog posts, gallery pictures, and entries from themes and plugins, your site may take too long to retrieve all that data from your site.
Hardware acceleration refers to when tasks are ‘redirected’ to hardware that is specialized to handle them. An example is sound cards being used to increase sound quality. By default, the CPU is the hardware designed to handle most tasks on a device. However, other hardware can come in to ‘relieve’ the CPU, allowing faster processing and performance.
On a browser, there is a setting called ‘hardware acceleration’ which allows the browser to maximize the usage of your hardware, for example, to load videos and graphics. Enabling hardware acceleration may improve your browser’s performance. This means that the browser will use ‘less CPU’ which in turn will free up more memory for the browser to load your website.
On Chrome, hardware acceleration is enabled by default. In order to determine the efficiency of hardware acceleration, you need to check for your browser’s performance when acceleration is enabled and when it is not. If it does not improve your browser performance, then you are better off without it.
After encountering the ‘taking too long to load’ error, a great approach is to rule out the most obvious causes, for example, internet connectivity. Check that you do have a functional internet connection and that it works on other sites and devices.
The second approach is to run connectivity tests in order to be more precise when fixing the error. While some of these fixes involve running commands from the command line interface, they are simple fixes, and you do not need technical knowledge to implement them. Here are the most common connectivity tests that you can run:
Nslookup, ‘name server lookup’ in full, is a tool that you can use to look up your DNS information, for example, your IP addresses, DNS servers that are responding to requests or even compare responses from different DNS servers. If you are using Linux, you can access this tool on the command line. There is also a nslookup online version.
This tool allows you to check the availability of a remote server. It helps you check whether your local PC or desktop connects to a remote host. You can easily run the test from your command line. Learn more about how to do a Ping test here.
Tracert is a tool that traces the route that data packets sent to and from your IP address take, and calculates the amount of time taken. The tracert test helps identify issues that occur during data transfers. An issue that may occur is increased latency. Latency is defined as the time it takes for the client to send a request and receive a response from the server.
If you have high latency, you may need to start using a CDN. CDNs (Content Delivery Networks) are distributed servers that decrease the distance of the geographical location of your servers (‘bring your servers nearer’). Instead of having to wait for a response from a server that is in another country, for example, you may have a CDN in your own country. This way, you not only increase your site’s speed but may also solve communication problems between client and server.
How to fix the website took too long to respond error
Like we mentioned, when it comes to fixing this error, you need to eliminate the most obvious causes first. In this section, we begin by discussing fixes to the most obvious causes of the error, before looking at fixes to the less obvious causes.
Check whether you are connected to the internet
The first step that you need to take is to make sure that your device is connected to the internet.
To check whether you have a valid internet connection on a wireless network on Windows:
- Click on the Wifi internet access icon on your taskbar
- Choose ‘network and internet settings’
- Launch the ‘network and sharing center’
- Click on your Wifi connection. A new window that shows ‘Wifi Status’ opens. You can see your ipv4 and ipv6 connectivity, speed, and internet quality here as shown:
- Click on ‘Details’ to see whether you have a working IP address and DNS server IP address as shown:
- Click on ‘properties’, then ‘TCP/ipv4’
- Then check ‘obtain an IP address automatically’
- Check ‘use the following DNS server address’
- Enter 18.104.22.168 as the preferred DNS server
- And the alternate DNS server as 22.214.171.124
- Apply changes, save and restart your PC.
If using LAN, check your settings by:
- Accessing your browser settings
- Clicking on ‘proxy settings’. This opens an Internet properties window.
- Click ‘LAN settings’
- Uncheck ‘use a proxy server’ if it is checked
- Check ‘automatically detect settings’
- Apply changes
Test your internet speed
Once you are sure that you have an internet connection, you may want to test the internet speed. If your internet speed is too slow, you may want to try loading the same page using a different provider’s internet. If this solves the problem, then your connection might have a problem.
Try and access the site using another device. For example, if you are using a PC, you may want to try to access the site on a mobile device. If it works on the other device, then there is a possibility that your device is unable to communicate with the server.
After eliminating internet connection issues, it is time to try other fixes. Let’s look at fixes to problems that may arise from your device being unable to communicate with the server.
The first step when it comes to identifying server problems is logging in. if the login is slow, it already indicates that there is a problem. You will use the ssh command on your Linux terminal as follows:
$ ssh -vvv hostname.domain.com
You can then use the top utility tool to check CPU usage. You should see something like this:
Press 1 to see more details as follows:
If us is above the number of CPUs, it means CPU usage is really high, and more CPU horsepower is required.
On Windows, you can check the server load for available resources and performance issues. One way to do this is via the Windows Task Manager.
To access the windows task manager:
- Click ‘start’
- Type in ‘task’
- Choose ‘task manager’
- Right-click on the taskbar area
- Choose ‘task manager’
Press Ctrl+Alt+End + Esc while on remote desktop
If you have never used it before, you may see the above window. Click ‘more details’
Otherwise, you should see a window with a breakdown of how the server is being used, as in the image below:
As you can see, there are different tabs: processes, performance, users, details, and services. Each of these will give you insights into how the server’s resources are being used (processes), and how much uptime the server has been running – uptime (performance). If the uptime is high, then it shows server usage is strained.
DNS server issues
Here, you will carry out a nslookup test. You can use the online version that we mentioned or use your command line on Linux. Here is how to use nslookup on the command line:
nslookup <domain name>
- Here is an example of a response:
Let’s break it down:
- DNS address – 126.96.36.199 – translates domain names into IP addresses
- $53 – the port number used by the DNS to accept queries
- 188.8.131.52 and 184.108.40.206 – IP address servers – your data packets will be routed to either of these.
- Non-authoritative answer – there was information received but not from the DNS server. This could be the reason for the ‘took too long to respond error’, as the request may have been deemed to have come from a non-authoritative source.
Learn more about DNS server errors and how to fix them from this article.
Now that you know the DNS server that is being used, you need to confirm that you do not have IP address conflict or have old DNS information. To do this, release the IP address and renew it. To achieve this on Windows 10:
- On your taskbar, type ‘UAC’
- You can also right-click on your start button and select ‘search’
- Choose ‘change user account control settings’
- You will see a slider that you will use to turn UAC on or off. We need it on. Drag the slider to the desired security level
- Click Ok
- You may need to enter your admin password or confirm your selection
- Restart your PC
- Open the command prompt
- Choose ‘ run as administrator’
- Type the following commands:
- To see the new IP and DNS server info run the following command:
If all the above does not fix your problem, you may need to contact your network admin or hosting provider so that they can check the server and configuration status of your DNS server.
Clear browser cache
To clear browser cache on Chrome:
- Open your browser and click on the three dots on the top right.
- Select ‘more tools’
- Then clear browsing data
- You may want to clear everything, so select ‘all time’
- If your site was working for a short time, for example an hour before it stopped, the you can clear cache for the last one hour.
- Check the boxes
- Then ‘clear data’
Use incognito mode
When you use incognito mode, your browser does not ‘store’ your activity. To use incognito mode in Chrome:
- Click on the ‘three dots’ on the top right
- Click ‘more’
- Then ‘new incognito window’
- It should have an incognito icon
To disable extensions in Chrome:
- Click the 3 dots on the top-right menu
- Choose ‘more tools’
- Then ‘extensions’
- Go through each one and remove those that are no longer necessary
- For those that you choose to keep, check their latest updates
- Click ‘details’
- Then ‘view in Chrome Web Store’
- Scroll to ‘additional information’
- You should see a date under ‘last updated’
- The last update should be within three months from the current date
- Remove those extensions. Later on, replace them with alternatives that are more frequently updated
- You can then try to access the site that had problems loading. If it still has problems, disable all extensions
- If the site works this time, you then know that extensions were the problem
- Enable one extension at a time when reloading the site, until when you have identified the extension causing problems
Firewall and antivirus
To disable your firewall on Windows 10,
- Click the start button
- Select ‘settings’
- Click ‘update and security’
- On the left menu, click ‘Windows Security’
- Click ‘Firewall and network protection’
- Choose the network settings that you want to turn off
- To disable firewall, click the on/off button
You may also need to uninstall your antivirus if disabling your firewall does not resolve the error. Note that it is not advisable to have your firewall disabled or to have no antivirus on your device. As soon as you resolve the problem, you need to turn firewall on and reinstall your antivirus.
Add or update network drivers
To access your drivers on Windows:
- Right-click on your PC
- Choose ‘manager’
- A new window, ‘computer management’ opens
- Choose ‘device manager’
- Then ‘network adapters’
- Choose the name of your ‘network adapter’
- Right-click on it
- Choose ‘scan for hardware changes’
- Then choose ‘properties’
- This will show you whether the driver is installed
- If it is already installed, select ‘update driver’
- It will look for updates and install them if any are found
To turn hardware acceleration on or off in Chrome:
- Choose ‘settings’
- Click on ‘advanced’
- Scroll until you see ‘system heading’
- Enable or disable ‘use hardware acceleration when available’
If this approach does not work, you can force it by:
- Entering chrome://flags in the address bar
- Go to ‘override software rendering list’
- Enable it
- Select ‘Relaunch now’
Modifying your ‘hosts’ file
To modify the hosts file:
- Open the start menu
- Select ‘all programs’
- Then ‘accessories’
- Right-click on notepad
- Choose ‘run as administrator’
- A new window opens
- Click on the file menu
- Select ‘open’
- From the drop-down menu, select ‘all types’
- From the list, click on the hosts
- If after the last sign line (after the #) there is an IP address or hostname, delete it, including any other data included here
- Save changes
- Restart your browser
Editing the Chrome default profile folder
Note that you need to export saved passwords and bookmarks before editing this folder. You could also sync Chrome with a Gmail account. This way, you will get them back as editing this folder resets Chrome, meaning that you will lose all data.
To edit the defaults folder:
- Open windows explorer
- Paste this in your address bar
- Once you have found the Default folder, rename it to ‘backup default’
- Run your browser.
To fix issues with corrupted files, locate the web data file and delete it. If your site still has a slow response, delete the local State file. Note that this will not result in the loss of any of your data. You can also uninstall any optional tools that come with your antivirus, for example, AVG Toolbar and AVG Secure Search.
Do a site clean up
You need to clean out images, posts, and content that you no longer use on your site. These could include posts in drafts, unused images, spam comments, and old user accounts that are no longer in use. You can go a step further and use a plugin like Advanced Database Cleaner to help you clean up your database. Check for plugins and themes that you no longer use too and delete them.
You can also optimize your images using plugins like Jetpack Image CDN, Compress JPEG & PNG Images and Smush Image Compression and Optimization. It is good to go for a plugin that can optimize images that are currently on your site and those that you will upload later.
You now know the options to explore when it comes to fixing ‘website takes too long to respond’ errors. You have an idea of what could be causing the errors, and the areas to check first.