How to Install LAMP on CentOS 7
LAMP Stack is a group of open source programs that work together to enable a server to host dynamic websites or web applications. LAMP represents L inux (operating system), A pache (web server), M ySQL (MariaDB database), P HP (scripting la...

4 min read
LAMP Stack is a group of open source programs that work together to enable a server to host dynamic websites or web applications. LAMP represents L inux (operating system), A pache (web server), M ySQL (MariaDB database), P HP (scripting la...
- What doesĀ 408 Request TimeoutĀ mean?
- Different Ways to See aĀ 408 Request TimeoutĀ Error
- How is aĀ 408 Request TimeoutĀ error different from aĀ 504 Gateway TimeoutĀ error?
Experiencing a 408 Request Timeout Error can be extremely frustrating. HTTP status code starting with 4XX is the client-side error code and 408 request timeout error is one of the client-side errors.
In this guide, we will learn how to fix a 408 request timeout error. Whether you're a user or a developer, we'll explore the causes behind this error and provide practical solutions.
From unraveling the technicalities to offering step-by-step troubleshooting, this guide equips you with the know-how to swiftly resolve the issue.
Before we dive into the solution letās understand what this error actually means and how it differs from theĀ 504 bad gateway timeout error.
What doesĀ 408 Request TimeoutĀ mean?
AĀ 408 Request TimeoutĀ error is an HTTP status code that is returned at the client side when a server takes a longer time to process any particular request than the allocated timeout. When this happens, the server terminates the connection and thus returnsĀ 408 Request TimeoutĀ error.
It is also possible that the server could be misconfigured and result in improper request handling which may also return aĀ 408 Request TimeoutĀ error.
408 Request Timeout Indication
- 408 Request Timeout is displayed
- It crashes the active browser window
- The browser may respond to the request slowly
Different Ways to See aĀ 408 Request TimeoutĀ Error
There are several different ways that you might see aĀ 408 Request TimeoutĀ error. These errors may appear differently on different web servers or hosting. Although they show different error messages, each one means the same.
- ā408 Request Time-outā
- ā408: Request Timeoutā
- āRequest Timeoutā
- āThe Request Has Timed Outā
- āHTTP Error 408 ā Request Timeoutā
How is aĀ 408 Request TimeoutĀ error different from aĀ 504 Gateway TimeoutĀ error?
You may have come across a similar error i.e.Ā 504 Gateway TimeoutĀ error. Since these two errors are quite similar, you might be wondering how it is different from one another.
TheĀ 504 Gateway TimeoutĀ error occurs while acting as a gateway or proxy. On the other hand, aĀ 408Ā error is returned when a request to load the web page takes longer than the server was prepared to wait.
Learn how to fixĀ the 504 Gateway Timeout error.
According toĀ RFC 2068, theĀ 504 Gateway TimeoutĀ andĀ 408 Request TimeoutĀ errors are defined as follows:
504 Gateway Timeout:
The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server it accessed in attempting to complete the request.
408 Request Timeout:
The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.
How to Fix a 408 Request Timeout Error
In certain cases, it can be difficult to immediately determine the source of an HTTP error. AlthoughĀ 4xxĀ errors are known to be client-side errors, this doesnāt mean that the server should be completely ruled out as the culprit. Below are a few things you can check, both on the client and server side in order to try and resolve aĀ 408Ā error.
Fix aĀ 408 Request TimeoutĀ error at client-side
Reload the Web Page
There are instances when this error occurs temporarily on the client side because of the browser. You can try to reload the web page or even reopen the browser to see if the error gets resolved.
Double check URL
Depending upon the configuration of your web server, the requested URL might throw a 408 request timeout error. Suppose, you are requesting a URL that requires certain permissions or credentials to get access, this might trigger a 408 error.
Check your internet connection
If there is any issue with your internet connection or it is running slow then the request made can take too long to complete. As a result, the serverās timeout exceeds and becomes idle which results in a 408 request timeout error.
Fix aĀ 408 Request TimeoutĀ error on server-side
Check your web serverās timeout settings
Most web servers like Apache and Nginx allow website developers to set certain timeout values in the configuration file which enables you to control the time required for certain requests.
So if you are receiving the 408 timeout error, the configured timeout value might be too low. You increase the timeout value and restart the server to see if the issue is resolved.
Apache
If youāre using the Apache web server, you need to check both the .htaccessĀ file and the Apache server config file. Inside these files look for theĀ KeepAliveTimeoutĀ orĀ RequestReadTimeoutĀ directives. If either of these directives is defined, increase its value and reload the webserver.
If you donāt find these directives inside the configuration file, you can add them along with their values and test a few requests by reloading the web server.
NGINX
If youāre using Nginx as a web server, open theĀ nginx.confĀ file and check for directives likeĀ client_body_timeout,Ā client_header_timeoutandĀ keepalive_timeoutĀ and then increase their values.
If you donāt find these directives, add them inside theĀ httpĀ orĀ serverĀ block along with their values.
You can test a few requests by increasing their values and reloading the web server.
Check the logs
While investigating any kind of server error, itās a good idea to check the error logs. It provides you with a whole lot of information about the error.
Additional Ways to Fix aĀ 408 Request TimeoutĀ Error
Other Fixes
- How to Fix 403 Forbidden Error in NGINX Ubuntu
- Fix 413 Request Entity Too Large Error on Nginx & Apache
- Fix 502 Bad Gateway Nginx Error in Ubuntu ā 4 Simple Steps
- PHP5-FPM 502 Bad Gateway Error (connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory)
- Fix 504 Gateway Timeout Nginx Error ā 5 Simple Steps
Conclusion
AĀ 408 Request TimeoutĀ error is fairly common and can be fixed quite easily most of the time. It simply passes the message to the client side that the request timed out for the website and that the server has terminated the connection.
I hope that you'll find the solution for addressing the 408 Request Timeout Error highly beneficial. We encourage you to share your thoughts and feedback in the comment section below.
Your insights are greatly valued and can contribute to refining the troubleshooting process even further.
Thank you for engaging with us!
Website Vidya Team
Technology educator and researcher at Website Vidya.
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides











Discussion
0No comments on this guide yet. Be the first to share your thoughts or ask a question!