What Is a 408 Request Timeout and How to Fix It

4 min. read
A 408 Request Timeout is an HTTP response status code that indicates the server didn't receive a complete request message within the server’s allotted timeout period. In other words, the server has decided to close the connection rather than wait. Your connection with the website "timed out."

What's the Difference Between a 408 Error and a 504 Error?

Although the 408 Request Timeout Error seems similar to the 504 Gateway Timeout Error, there are still some differences between the two errors. 


For instance, the 504 Gateway Timeout error appears when a server acts as a gateway or proxy and has timed out.


On the other hand, the 408 Request Timeout Error is not a direct message from the server acting as a gateway or proxy, but from the active server the client is connected to.


How can a 408 Request Timeout Error Appear?

There are a few different ways how a 408 error can appear in your browser. How the error occurs often depends on each website and the web server that is being used. 


The most common ways how a 408 Request Timeout Error can appear on your screen include:


  • Request Timeout

  • 408: request Timeout

  • HTTP Error 408 - Request Timeout

  • 408 Request Time-out

  • The Request Has Timed Out

Is it a client-side or a server-side error?

The HTTP response codes in the 4xx group are considered to be client-side errors, such as the 401 Unauthorized, the 403 Forbidden Error, and the 400 Bad Request Error

To compare, the errors in the 5xx group, like the 504 Gateway Timeout Error we mentioned, are considered server-side errors


For example, the 408 Request Timeout Error can be due to an incorrectly typed URL or a slow internet connection. 


However, this doesn't necessarily mean that the 408 Request Timeout Error is a client-side error. In some cases, a server can be the main cause of the issue. 


For example, there may be a misconfiguration of the server, and as a result, the server can be mishandling requests. 


With that said, we can't rule out either the client or the server as the main culprit in this scenario.


How Do I Fix a 408 Request Timeout?

Start With Application Backup

Before attempting any of the steps we'll discuss below, the first step is to perform a full backup of your site, database, and other components of your site. 


Doing a website backup means that you will have a copy of your content and data. In case something happens to your website, you'll only need to restore your website’s most recent backup and move on.


Troubleshooting Client Errors

Check the URL

One of the leading causes for a 408 Request Timeout Error is a typing mistake in the URL.


With that said, the first thing you want to do is see if you typed the URL correctly. Pay attention to the domain name and the specific webpage you wish to access and see if they're separated with slashes. If the URL contains some particular characters, check to see if they're correctly inserted.

Rollback Recent Upgrades

Many websites are hosted on a Content Management System (CMS) like WordPress or Wix. Although these platforms are stable and secure, some issues may appear once you start making changes to the underlying extensions or PHP code.


If you updated the CMS just before the 408 Request Timeout Error appeared, then that recent upgrade may be the issue's root cause.


What you can do in this case is to roll back the system to its previous version.


Uninstall New Extensions, Modules, or Plugins

Although extensions and plugins may do a fine job at improving your website's capabilities, they can also cause severe damage. 


There are some extensions that can take full control of your system and change your code, as well as your database. A recommended step in this scenario is to uninstall any new extensions you've recently added to your system.


If you need help uninstalling the extension, simply do a quick Google search to find the official documentation for the process.


Double-Check Your Database Changes

It's possible that the changes an extension makes to a system not to be fully reverted, even if you uninstall that extension.


Some extensions may have full access to the database and a "free hand" to alter database records that are created and managed by other extensions and don't belong to the extension itself.


When this happens, the extension may not know how to revert alterations to the database records, leading to the extension ignoring such things during uninstallation. 


The best thing you can do in this scenario is to open the database and manually comb through tables and records that might have been modified by the extension. Or, you can do a quick research and try to find people who have experienced the same issue to see how they handled the problem.


Troubleshooting Server Errors

Check the Configuration Files for Your Server

If none of the methods explained above didn't fix the 408 Request Timeout Error, try checking the configuration files for your web server software for unintentional redirect instructions.


Your site can be running on Apache or nginx web servers. 


If it runs on Apache, you need to check both the apache server configuration file and the .htaccess file. Locate the .htaccess file, open it in a text editor, and look for lines that use RewriteXXX directives. In case you come across any strange RewriteCond or RewriteRule directives, try temporarily commenting them out using the # character prefix. Restart your web server and see if the issue is resolved. 


If your site runs on nginx, you need to check the nginx.conf file. The file is located in one of a few common directories: /usr/local/nginx/conf, /etc/nginx, or /usr/local/etc/nginx. Once you locate the file, open it in a text editor and search for directives that are using the 405 response code flag. Comment out any abnormalities and then restart the server to see if the issue was resolved.

Check the Application Logs

The application logs can tell you a great deal about your website. You'll be able to see your site's history, such as which pages were requested, which servers it connected to, and more. Doing so can steer you in the direction of where the 408 Request Timeout Error is originating from.

Debug Your Application Code or Scripts

Our list's final step is to see if some custom code within your application is causing the 408 Request Timeout Error. 


This requires manually debugging your application and going through your application and server logs. 


Do a step-by-step debugging process. You will manage to recreate the exact scenario in which the 408 Request Timeout Error occurred and view the application code the moment something goes wrong.


To Wrap Up

Share:

As seen in  

&