Apache 408 ошибка

The apache error 408 specifies that the server did not receive a complete request from the client within a specific timeout period.

The apache error 408 specifies that the server did not receive a complete request from the client within a specific timeout period.

Here at Bobcares, we have seen several such apache related errors as part of our Server Management Services for web hosts and online service providers.

Today we’ll take a look at the causes for this error and see how to fix it.

Why does apache error 408 occur

When the website connection times out this error occurs. To be simpler when we make a request to the web server, it takes too long for the request to complete when compared to the waiting time of the website’s server.

This means the client request time is higher greater than the server waiting time. So this error is known to be a client-side error.

The Apache 408 error appears with the text “404 Request Time-out” error. For instance, the error appears as shown below.

Apache Error 408

How we fix apache error 408

There are different ways to fix this error. Although this error is known to be a client-side error, it doesn’t mean that there is no issue with the server end. Now, let’s take a look at the different fixes our Support Engineers provide to our customers to tackle this error.

Client-Side troubleshooting

1. Check your internet connection.
Make sure that you have a good internet connection. In case, if the internet is slow then it could take too long for this request to complete. As a result, if the server timeout value exceeds then a 408 error will occur.

2. Check the URL
Entering an incorrect URL is one of the common causes of this error. So double-check your URL.

3. Revert recent upgrades
If you’ve recently updated the CMS then try reverting it to the previous version.

In case, if you have updated any other extension, modules, themes, or any plugins then this can also be a culprit of your error. So try reverting it to the previous version or you can even consider uninstalling it as well.

4. Reload the webpage
This one is the easiest method to fix this error. Sometimes, a temporary issue on the client or server-side can cause this error. So simply reloading the page can resolve the error.

Server-Side troubleshooting

1. Check the server configuration
Make sure that the web server’s timeout value is not less than that of the client request time.
Check your .htaccess file and the Apache configuration file. Find: KeepAliveTimeout or RequestReadTimeout directives and try increasing their values. Then reload the webserver and try again.

2. Check the logs
Look for the server error logs. This will provide you more information in order to fix this error.

[Need any further assistance in fixing Apache errors? – We are here to help you.]

Conclusion

In short, this error occurs if the server did not receive a complete request from the client within a specific timeout period. Today, we saw different ways to fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

A colleague recently remarked that while my last post gave a valid explanation how a 408 could have an association with a security measure, it offered no solution.

Piped Access log is my personal solution.

The following should work out-of-the-box on most Ubuntu configurations, and with minimal tinkering on other Apache configurations. I’ve chosen PHP because it’s the easiest to understand. There are two scripts: the first prevents a 408 being written to your access log. The second script sends all 408s to a separate log file. Either way the result is no more 408s in your access log. It’s your choice which script to implement.

Use your favorite text editor, I use nano. Open the file where you have your ‘LogFormat’ and ‘CustomLog’ directives. Comment-out the originals with the usual # and add the following. You may find these directives in the file below.

sudo nano /etc/apache2/sites-available/default

LogFormat "%h %l %u %t "%r" %>s %O "%{Referer}i" "%{User-Agent}i"" AccessLogPipe

CustomLog "|/var/log/apache2/PipedAccessLog.php" AccessLogPipe env=!dontlog

NOTE: I don’t log images in my access log. In my etc/apache2/httpd.conf file I include the line

SetEnvIfNoCase Request_URI ".(gif)|(jpg)|(png)|(css)|(js)|(ico)$" dontlog

If this is of no interest to you then remove the env=!dontlog from the CustomLog directive.

Now create one of the following PHP scripts (#!/usr/bin/php is a reference to the location of the interpreter, make sure that the location is correct for your system — you can do this by typing at the $ prompt; whereis php — this should return something like php: /usr/bin/php /usr/bin/X11/php /usr/share/man/man1/php.1.gz. As you can see #!/usr/bin/php is right for my setup).

sudo nano /var/log/apache2/PipedAccessLog.php

#!/usr/bin/php
<?php
  $file = '/var/log/apache2/access.log';
  $no408 = '"-" 408 0 "-" "-"';
  $stdin = fopen ('php://stdin', 'r');
  ob_implicit_flush (true);
  while ($line = fgets ($stdin)) {
    if($line != "") {
      if(stristr($line,$no408,true) == "") {
        file_put_contents($file, $line, FILE_APPEND | LOCK_EX);
      }
    }
  }
?>

sudo nano /var/log/apache2/PipedAccessLog.php

#!/usr/bin/php
<?php
  $file = '/var/log/apache2/access.log';
  $file408 = '/var/log/apache2/408.log';
  $no408 = '"-" 408 0 "-" "-"';
  $stdin = fopen ('php://stdin', 'r');
  ob_implicit_flush (true);
  while ($line = fgets ($stdin)) {
    if($line != "") {
      if(stristr($line,$no408,true) != "") {
        file_put_contents($file408, $line, FILE_APPEND | LOCK_EX);
      }
      else {
        file_put_contents($file, $line, FILE_APPEND | LOCK_EX);
      }
    }
  }
?>

Having saved the PipedAccessLog.php script; make sure that root has ownership by executing the following at the $ prompt.

sudo chown -R root:adm /var/log/apache2/PipedAccessLog.php

The PipedAccessLog.php script will need read/write and execute permissions so execute the following at the $ prompt.

sudo chmod 755 /var/log/apache2/PipedAccessLog.php

Finally to get everything working you need to restart the Apache service. Execute the following at the $ prompt.

sudo service apache2 restart

If your Apache logs are located elsewhere then change the paths to suit your configuration. Good Luck.

Posted 2021-02-05

with tags HTTP, web servers, Apache, HTTP 408

What is a 408 Request Timeout Error

This error means the server timed out waiting for the client after the client has initiated a request. From the W3 HTTP specs: «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.» Also see RFC2616.

Are 408 Request Timeout Errors a Problem?

Not necessarily, and 408 errors may not be indicative of a larger issue. In many cases 408 errors are just connections that hold Apache open for longer than allowed based on the timeout settings in the web server’s configuration files.

If Apache never enforced any timeout settings to close connections where the client has not communicated in a certain amount of time, then a single bad actor could flood the server with connections and not allow anyone else to connect.

In some cases these 408 errors come from systems looking for exploits. In recent years link previews and link prefetching have become popular and can also cause 408 errors as the services that implement such link previews (think Slack, social media sites, etc.) do not respect the standards and may leave server connections hanging after receiving the data they need (frequently the og-image, title, and description for the link preview). And link prefetching may just make the initial connection request prior to the user actually clicking the link, so a connection will be initiated on the server side which is left to die on the server side if the user never actually clicks the pre-fetched link.

Required reading about such problems with Google Chrome’s prefetch implementation:

  • How Chrome’s pre-connect breaks HaProxy (and HTTP)
  • HAProxy and HTTP Errors 408 in Chrome — HAProxy Technologies
  • 377581 — Chromium does not handle 408 responses — chromium

Related Apache Configuration Settings:

KeepAliveTimeout
Timeout

Related Apache Modules:

mod_reqtimeout — Apache HTTP Server Version 2.4

Related Attacks:

Slow Loris — if client connections are not timed out after a reasonable interval, an attacker can attempt to max out connection slots to the web server. Duck Duck Go for more info and ways to mitigate, and how to scan log files to identify possible attackers by IP address.

Sources and Related Resources

  • ‘http-status-code-408’ tag wiki — Stack Overflow
    • RFC 2616 — Hypertext Transfer Protocol — HTTP/1.1
    • apache 2.2 — Getting 408 errors on our logs with no request or user agent — Server Fault
    • Timeout and Keep Alive in Apache
    • Apache Performance Tuning for Linux — OLinux
    • Apache Performance Tuning — Apache HTTP Server Version 2.4
    • apache2 — Understanding “408 Request Timeout” on Apache with PHP — Stack Overflow
    • apache 2.2 — too many 408 error codes in access log — Server Fault

and

  • mod_reqtimeout — Apache HTTP Server Version 2.4
  • access_log — what is 408??? | cPanel Forums
  • Reverse Proxy Intermittant 408 Time Out Errors — Forum — Hiawatha webserver
    • 377581 — Chromium does not handle 408 responses — chromium
  • apache2 — A lot of 408 errors in apache logs — how to prevent them? — Webmasters Stack Exchange
    • apache 2.2 — too many 408 error codes in access log — Server Fault
    • apache 2.2 — How can I detect Slowloris? — Server Fault
    • Quite a few 408 errors in Apache log — DoS ? | Linode Questions
  • apache 2.2 — Getting 408 errors on our logs with no request or user agent — Server Fault
  • apache2 — Understanding “408 Request Timeout” on Apache with PHP — Stack Overflow
    • How Chrome’s pre-connect breaks HaProxy (and HTTP)
    • HAProxy and HTTP Errors 408 in Chrome — HAProxy Technologies

How to Fix a 408 Request Timeout Error?

The HTTP Status Code starting with series digit 4xx are the client side error codes. The 408  Request Timeout Error code is one of the client-side code that occurs when the request time to load a webpage exceeds.

It is also possible that the server could be the cause of a 408 Request Timeout Error. In some cases, there is a chance that the server may be misconfigured and results in improper requests handling which in return may lead to 408 response code.

What Does 408 Request Timeout Mean?

The 408 Request Timeout Error code occurs when a connection with the website is timed out. It means the request you made to the web server is taking too much time as compared to the waiting time of the website’s server.

Client requests load time is much higher than the server’s waiting time for a particular request. In short, Request Time > Server Waiting Time.

408 Request Timeout Error

In this case, the server will terminate the connection and thus return in 408 Request Timeout Error.

Symptoms of HTTP Error 408

1. It crashes the active window.

2. Request Timeout is displayed.

3. Windows runs sluggishly and responds slowly to input devices.

Different ways to See a 408 Request Timeout Error

You can see the 408 Request Timeout error in many different ways. Although the textual presentation is slightly different otherwise, each one has the same meaning.

1. “408 Request Time-out”
2. “Request Timeout”
3. “The Request Has Timed Out”
4. “408: Request Timeout”
5. “HTTP Error 408 – Request Timeout”

How Is a 408 Error Different From a 504 Error?

If you are a website owner, then there are 99% of the possibilities that you have encountered during the 504 Gateway Timeout error. You may also be wondering that how a 408 Request Timeout Error is different from the 504 Gateway Timeout error.

The HTTP status code 504 Gateway Timeout error is returned when a server is acting as a gateway or proxy and has timed out. While the 408 Error, returned as a direct message from the active server.

The 408 Request Timeout:

This error occurs when the server request wait time is lower than the server 
request time.

While the 504 Gateway Timeout:

This error occurs when one server is not able to receive a timely response from 
another server that may be acting as gateway or proxy.

Start With a Backup

Prevention is better than cure. It is better to walk on the safer side than not regret later.

It is recommended to take a full backup of your website, database and all other components before attempting any fixes. You can use Backup Bank to take a complete backup of your website and database. You can find it easily on wordpress.org plugins directory.

Different Methods to Fix a 408 Request Timeout Error

It is very difficult to detect the source of the HTTP error. Although the 4xx series error is known to be the client-side errors. But it doesn’t mean that the server is completely ruled out as the culprit.

Method 1) Client Side fixes

Below are a few things you can check on the client side in order to fix the 408 Request Timeout Error.

1. Double Check the URL

Sometimes, the cause behind the error is the URL you are requesting.

Now, suppose that you are requesting a URL that requires certain credentials to access and depending on how the server is configured, this could trigger a 408 response from the server. Or you are requesting a website URL from the saved bookmark that not exists.

2. Check your Internet Connection

Try to check your internet connection. If it is slow, then this could take too long to complete the request. As a result, the server timeout value exceeded and it becomes idle. This will returns 408 HTTP Status Code.

3. Try Reloading the Page

This is the easiest way to get rid of the error. Sometimes, there is a temporary problem on the client side or even the server side. Try to refresh the page that you are trying to access to see if the error has been resolved or not.

4. Rollback Recent Upgrades

If you have recently updated the WordPress just before the 408 Request Timeout appeared, you may need to rollback to the previous version.

Similarly, any extension, any modules or even any plugin or theme that you may have recently upgraded can also cause server-side issues, so retrieving to the previous version of those may also help.

Method 2) Server Side Fixes

Below are a few things you can check, on the server side in order to fix the 408 Request Timeout Error.

1. Check your Web Server’s Timeout Settings

It is possible that your web server’s timeout value is less than that of the client request time. Apache, Nginx is the web servers that allows web developers to set some timeout values so that the request is not open for a long time.

Moreover, if you are receiving a continuous 408 request timeout error then, this might be the small timeout value.

If we talk about the Apache Server, check for the .htaccess file as well as the Apache server config file. Look for: KeepAliveTimeout or RequestReadTimeout directives

In the case of the Nginx Server, Open the nginx.conf file and check for directives such as client_body_timeout, client_header_timeout or keepalive_timeout

If either of these directives is defined, try increasing their values, reload the web server and try again.

2. Check the Logs

It is always good to check the server’s error logs. This may provide you with information in order to help you resolve the issue ( like what is the nature of the error? or from where it is originated ).

Conclusion

WordPress Plugins


  • Backup Bank


  • Captcha Bank


  • Captcha Booster


  • Clean Up Booster


  • Clean Up Optimizer


  • Coming Soon Booster


  • Contact Bank


  • Facebook Like Box


  • Gallery Bank


  • Gallery Master


  • Google Maps Bank


  • Limit Attempts Booster


  • WP Mail Bank


  • WP Mail Booster

How to Fix a 408 Request Timeout Error? 1

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, we will learn how to fix a 408 request timeout error. Before we dive into the solution let’s understand what does this error actually mean and how does it differ from the 504 bad gateway timeout error.

+

What does 408 Request Timeout mean?

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. So 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
  • 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 message, 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 that 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 504 Gateway Timeout error.

According to RFC 2068, the 504 Gateway Timeout and 408 Request Timeout error 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.

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 at 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, if you are requesting a URL that requires certain permissions or credentials to get the 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 that results in 408 request timeout error.

Fix a 408 Request Timeout error at server-side

Check your web server’s timeout settings

Most of the 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 to 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 it’s 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_timeoutclient_header_timeoutand keepalive_timeout and then increase their values.

If you don’t find these directives, add them inside the http or server block aongwith 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 a server error, it’s a good idea to check the error logs. It provides you with a whole lot of information about the 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

408 Request Timeout error is fairly common and can be fixed quite easily most of the time. It simply passes the message on the client-side that the request timed out for the website and that the server has terminated the connection.

I hope you will find the solution on how to fix a 408 Request Timeout Error useful. Do put your views in the comment section below.

Encountering HTTP status code errors can be frustrating and stressful. This is especially true when you don’t know what the message means or what’s causing it. One of the errors you might be dealing with is HTTP 408 Request Timeout.

Fortunately, you can take a handful of steps to troubleshoot and resolve this issue. You’ll simply need a basic understanding of what could be causing the HTTP 408 error, then implement solutions to fix it.

In this post, we’ll explain the HTTP 408 status code and some common causes of the error. Then we’ll walk you through eight potential solutions for resolving it. Let’s jump in!

Check Out Our Video Guide to Fixing the HTTP 408 Error

What the HTTP 408 Status Code Is

HTTP status codes indicate the status of a client’s request. They can also redirect clients to different resources, depending on their requests.

The most common HTTP status code is 404, which indicates that the requested resource could not be found. Other common status codes include 200 (OK), 400 (Bad Request), and 500 (Internal Server Error).

Status codes are divided into five categories:

  1. Informational: The server is still processing the request.
  2. Successful: The request was completed successfully.
  3. Redirects: The client should be redirected to a different resource.
  4. Client Errors: There was an error with the request.
  5. Server Errors: There was an error with the server.

HTTP 408 falls into the category of client errors. The status code communicates that the server did not receive a timely response from the client and that the server timed out waiting for the request. This can happen if the client takes too long to send the request or the server is too busy to process it.

The HTTP 408 error is similar to the 504 Gateway Timeout status code. However, the former doesn’t come from a gateway or proxy server. Instead, it comes directly from the web server the client is connected to.

Encountering HTTP status code errors can be frustrating and stressful. 😰 This guide can help. 🛠Click to Tweet

Common Causes of the HTTP 408 Request Timeout Error

There are a handful of potential reasons behind the HTTP 408 request timeout error. These causes include:

  • Network latency
  • Clients timing out
  • Servers being too busy to handle the request

The 408 Request Timeout error means the request you sent to the website server took longer than the server was prepared to wait. It can happen due to heavy traffic on the internet or a slow connection on your side.

The problem with this status code is that it can occur for both client-side and server-side-related reasons. In other words, although the 408 error is categorized as a client error, this doesn’t necessarily mean the issue stems from the browser or device. It’s possible that the server is misconfigured or isn’t handling requests correctly.

How To Fix the HTTP 408 Error (8 Solutions)

Now that we understand more about the HTTP 408 status code, let’s discuss how you can resolve it. Below are eight potential solutions you can use, separated into two categories: client-side and server-side.

Client-Side

Below are some client-side solutions you can use to resolve the HTTP 408 error!

1. Back Up Your Site

The first thing you should do before troubleshooting the HTTP 408 error is back up your website. Then, if anything goes wrong while trying to fix the issue, you will have a full, updated version of your files and database to restore.

There are several methods you can use to back up your site. One is the manual approach. This method involves using a Secure File Transfer Protocol (SFTP) client, such as FileZilla. After receiving your SFTP credentials from your host and connecting to the server, you can download your files from the root directory (public_html folder).

Next, you’ll need to download your database via phpMyAdmin. If you’re a Kinsta user, you can access this through MyKinsta > Sites > Info:

MyKinsta database section

The database access section from MyKinsta

Then select Open phpMyAdmin to launch the database manager. Select your site’s database from the menu:

The Kinsta phpMyAdmin screen

The Kinsta phpMyAdmin screen

Next, click on Export at the top of the screen. Make sure to select SQL under Format, then click on Go. Your database file should begin downloading.

You can also use a backup plugin such as UpdraftPlus. After installing and activating the plugin, navigate to Settings > UpdraftPlus Backups in your WordPress dashboard, then click on Backup Now:

Using UpdraftPlus to backup a WordPress site

Backing up WordPress site with UpdraftPlus

A third option is to back up your site through your web host. At Kinsta, you can view your existing backups by logging into MyKinsta and then navigating to the Backups tab:

The MyKinsta Backups tab

The MyKinsta Backups tab

You can create up to five manual backups, which are automatically stored for two weeks. We also offer DevKinsta, a free local WordPress development tool you can use for staging and backing up your site to a local environment.

You can do this by going to DevKinsta and selecting the Import from Kinsta option. You may need to verify your hosting credentials. Once you choose your site, DevKinsta handles the rest.

2. Check the URL

One of the reasons you may be seeing the HTTP 408 status code error is that you simply typed the wrong URL into the browser. Therefore, you should now double-check the URL to ensure you didn’t make any typos.

Pay close attention to the domain name, especially if there are slashes or hyphens. Try re-entering the URL and then reloading the page. If the timeout request error is still present, you can move on to the next solution.

3. Review Recent Database Changes

If you’ve made any recent changes to your database, they may be causing the HTTP 408 error. You’ll need to revert any changes you’ve made to fix the issue.

Recently installed extensions or updates to your database may have altered database records that are causing problems. To see if this is the case, we recommend opening your database (phpMyAdmin) and manually going through to check any tables or records that have been recently modified. If you find any, revert them to their original states.

4. Uninstall Extensions and Plugins

Adding extensions and plugins to your site can cause various incompatibility issues and errors, including the HTTP 408 status code. One of the easiest ways to see whether this is the case is to deactivate all of the plugins on your site.

If you have access to your WordPress dashboard, you can do this by navigating to Plugins from the admin area, selecting all of the installed plugins, then selecting Deactivate from the Bulk actions dropdown menu. Now click on Apply:

Deactivating WordPress plugins in bulk

Deactivating WordPress plugins in bulk

If you don’t have access to your dashboard, you can bulk deactivate your extensions by connecting to your site via SFTP, then renaming the plugins folder to something like “plugins_old”.

Revisit your site. You can assume a plugin was to blame if you no longer see the error message.

You’ll need to reactivate each plugin one by one, checking the site in between. Once you see the error message again, you’ll have to uninstall that extension and find a replacement (or contact the developer for more information).

5. Roll Back Recent Changes

If you’ve recently made any changes to your WordPress site, such as installing a new plugin or updating the WordPress software, you might be seeing the HTTP 408 error. New tools can sometimes lead to configuration problems. You can roll back recent changes by restoring your site to a previous version.

If you’re a Kinsta user, open your MyKinsta dashboard, then navigate to Sites and select your site. Next, click on Backups.

From the list of backups, find the version you want to restore, click on Restore to, then select Staging or Live:

Restoring a WordPress backup from MyKinsta

Restoring a WordPress backup from MyKinsta

Next, you can confirm the backup restoration and click on Restore backup. Once the backup is complete, you can check to see whether the error message is still displaying.

Server-Side

If none of the above solutions worked, the HTTP 408 error might be caused by a server-side issue. Let’s look at potential solutions you can use to resolve it.

6. Check Server Config Files

One of the ways you can determine the cause of the HTTP 408 error is to check your server configuration files via SFTP. The process for doing so will depend on your server software.

Chances are that your server is either running on Apache or Nginx. If you’re a Kinsta user, we use Nginx.

If you’re using Apache, you can look for the .htaccess file within your site’s root directory. When you locate the file, open it and look for the following lines:

  • KeepAliveTimeout
  • RequestReadTimeout

If you find these directives, you can comment them out by using the # symbol prefix before the line. Then you can save the file and reload the page in your browser.

If you’re a Kinsta user, you can check your .htaccess file by opening your MyKinsta dashboard and navigating to your website under Sites. Locate the SFTP/SSH section to get your credentials, then use them to connect to your site via an FTP client.

Next, navigate to the public_html folder, then locate and open the .htaccess file:

The .htaccess file of a WordPress directory

The .htaccess file of a WordPress directory

Look for either of the directives listed above. If you see any of these rules, comment them out and save your changes.

7. Review Application Logs

Your server-side logs can be invaluable for providing information about your applications, including what they did, the pages requested, the servers connected to, and more. If you’re a Kinsta user, you can check your error logs using the log viewer in MyKinsta.

If you’re not using a Kinsta hosting plan or your host doesn’t provide a logging tool, you can insert the following code into your wp-config.php file:

define( 'WP_DEBUG', true );

define( 'WP_DEBUG_LOG', true );

define( 'WP_DEBUG_DISPLAY', false );

This will enable WordPress debugging mode.

From MyKinsta, navigate to Sites > Logs:

The MyKinsta Log viewer

The Log viewer in MyKinsta

Here, you’ll find the Log viewer that displays your error logs. You can click on access.log from the dropdown menu. This is where you can find all the HTTP requests from your website. You can also look for any HTTP 408 requests using the search bar.

If you locate any errors, you can use the information to pinpoint which web page is causing the issue. This can help you narrow down the source of the problem.

8. Debug Apps or Scripts

At this point, if you’re still seeing the HTTP 408 error, it’s time to debug your site. There are a handful of options you can use for this process.

One is to use a plugin such as Query Monitor:

The WordPress Query Monitor plugin

The WordPress Query Monitor plugin

This free plugin debugs your website’s performance and development. It enables you to check database queries, scripts, timing, and more.

Another option is using an Application Performance Monitoring (APM) tool. This software helps you monitor and optimize the performance of your website or application.

Using an APM tool can help you debug your site by giving insight into its performance and the location of any bottlenecks. This information can help you identify and fix any issues causing your website to run slowly or have other performance problems.

You can use our Kinsta APM Tool. It’s a custom-designed performance monitoring tool for WordPress sites that helps you identify performance issues. It’s also free for all sites hosted with us.

You can access the Kinsta AMP via your MyKinsta dashboard by navigating to Sites > Kinsta APM:

The Kinsta APM tool

The Kinsta APM tool

Once you enable the APM, you can use a variety of tools and features. These include diagnosing performance issues and monitoring results.

 It’s easier than you may think to fix this pesky issue. 😌 Here’s how to get started… ✅Click to Tweet

Summary

HTTP status codes can provide a wide range of information about client and server requests. However, some of these messages indicate problems, such as the HTTP 408 Request Timeout error.

As we discussed in this post, the source of the issue may be either client- or server-side. To troubleshoot and resolve the status code error, you should review and roll back recent changes, check your server configuration file and application logs, and debug your apps and scripts.

Do you want to switch to hosting that provides easy access to software for identifying, testing, and fixing issues on your site? Check out our Kinsta hosting plans to learn more about our APM and development tools!


Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:

  • Easy setup and management in the MyKinsta dashboard
  • 24/7 expert support
  • The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
  • An enterprise-level Cloudflare integration for speed and security
  • Global audience reach with up to 35 data centers and 275 PoPs worldwide

Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.

Не могу решить проблему с ошибками 408, которые пишутся в лог default виртуал хост

сначала начитался, что дос атаки сюда попадают, типа мертвые соединения.

Но за вчера на 500 000 открытых страниц 15тыс соединений попали в логи с 408 ошибкой.

сегодня обнарижил там ИП Гугловсого робота 66.249.76.37 и другие ИП Гугла, на 3500 записей 125 Гугловских, понял, что не DDoS атаки.

much:80 37.147.211.111 - - [21/Dec/2012:01:05:44 +0200] "-" 408 0 "-" "-"

much:80 66.249.76.37 - - [21/Dec/2012:01:08:47 +0200] "-" 408 0 "-" "-"
much:80 217.118.64.39 - - [21/Dec/2012:01:10:53 +0200] "-" 408 0 "-" "-"
much:80 217.118.64.39 - - [21/Dec/2012:01:11:27 +0200] "-" 408 0 "-" "-"
much:80 213.109.234.32 - - [21/Dec/2012:01:11:49 +0200] "-" 408 0 "-" "-"

из лога не понятно, к какому виртульному хосту, какой странице, какой браузер обращается???

из /etc/apache2/apache2.conf важные параметры

#

# ooo OLD 300
Timeout 20
# ooo OLD 100
MaxKeepAliveRequests 150
KeepAliveTimeout 5
<IfModule mpm_prefork_module>
StartServers 50
MinSpareServers 5
MaxSpareServers 256
MaxClients 256
MaxRequestsPerChild 10
</IfModule>
<IfModule mpm_worker_module>

StartServers 20
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 250
MaxRequestsPerChild 10
</IfModule>
<IfModule mpm_event_module>

StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

еще прикручены libapache2-mod-evasive и libapache-mod-security

Кто знает как решить проблему?

Спасибо за помощь.

Код ошибки http сервера — ошибка 408 Request Time-out

Этот код ответа означает, что клиент не передал полный запрос в течение некоторого установленного промежутка времени (который обычно задается в конфигурации сервера) и сервер разрывает сетевое соединение.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Ap инициализация перед загрузкой микрокода как исправить
  • Aotai amig 500 ошибки
  • Aomei ошибка 5 при переносе ос
  • Aomei 4140 backupper ошибка
  • Aol error 138 network denied

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии