Openserver 408 ошибка

Пробую сделать «Доступ извне к локальными доменам» как в документации, но не получилось.

«Для работы в сети Интернет необходим статический(белый) IP адрес. Чтобы открыть доступ к серверу извне необходимо указать * в качестве IP адреса в настройках Open Server, в этом случае доступ откроется сразу для всех сетей, к которым подключён ваш компьютер»

на смарте в опере : код ошибки 408 сервер не отвечает
на удаленных компах: 404 Not Found ginx

как же так, кто подскажет?
Догадки: ДрВеб, дефолтКонфиг ОпенСервера (4,6,4)

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.

Issue description — Apache logs

I found items similar to this one in the Apache log file:

166.147.68.243 [24/Feb/2013:06:06:25 -0500] 19 web-site.com "-" 408 - "-"

I’ve got custom log format and 408 here stands for status. The log format is:

LogFormat "%h %t %D %V "%r" %>s %b "%{User-agent}i"" detailed

And normally the line in the log file looks like

184.73.232.108 [26/Feb/2013:08:38:16 -0500] 30677 www.site.com "GET /api/search... HTTP/1.1" 200 205 "Zend_Http_Client"

This is why 408 error lines look strange to me. No request is logged and I have no idea on what should be optimized.

Questions

How to tackle the issue?
What additional information or logs should I gather?
What might cause the issue? Is this something wrong on the server? Or is this absolutely a network connectivity problem?

I’m addressing this because our customer complained that he has got 408 error on his mobile phone. I found many records in the log file but I have to admit I don’t know what to do with this.


My own research

There are several questions on this subject already here. But people are much more specific. Like they discus issues with some specific client software and scripts. Here I just got the error when opening some page on iPhone.

For example in HTTP, 408 Request timeout, it is suggested to do the GET request before POST. If I have custom client I can do this. But I can not control the behavior of the user’s browser.

Guess #1

When searching the Internet and thinking about the issue I found https://serverfault.com/questions/383290/too-many-408-error-codes-in-access-log

The suggestion is to update the Timeout config parameter back to its default value.

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

I tried the value 30 first because I thought 30 seconds should be enough. But even with 300 seconds default value, I continue to get the errors in the log. I did tail -f when I was writing this text and got more then 10 lines in a few minutes.

To me this does not look a complete solution.

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»;

When a client sends a request to an Apache web server, sometimes this request will not be honored due to response timeout exceeded.

As part of our Server Support Services, we have helped customers to fix numerous Apache web server errors.

In this context, we shall describe the nature of the error and how to fix it.

More about Apache Error 408

As earlier stated, a web server responds to a client’s request and therefore displays the website content on the web browser. In some cases if the time it takes to respond is exceeded without completing the request to the web server, an error will occur.

When you see on your web browser «404 Request Time-out» know that this has to do with the response from the Apache web server not successful!

How to get rid of Apache Error 408

We can apply different approaches in getting a solution to this problem by troubleshooting both the client side as well as the server side.

i. Troubleshooting the Client-Side

To troubleshoot the Client Side, you have to look into different areas. We shall list a few below;
a. URL check: This involves testing the URL for errors.
b. Degrading to a previous version of your website version if the upgraded newer version is causing issues such as in WordPress CMS, themes, plugins and so on.
c. Refreshing the web page: There might be caching issues in the client side such as in web browsers. So refreshing the page could be the fix that you need to apply.
d. Internet connection Issues: Your internet connection might just be the cause of the issue. So ensure that your are connect and can access the internet via your web browser.

ii. Troubleshooting the Server-Side

You can do the following to troubleshoot the Server Side;
a. Web Server Configuration Inspection: This means that you have to check the Apache web server configuration file to see if the Timeout value is low. To fix this simply increase the KeepAliveTimeout or RequestReadTimeout. After making such changes, restart the Apache web server to enable the changes to take effect.
b. Observe logs file: It is very important to check the Apache log file for more information about why the error occurred. This will tell you what needs to be fixed.

Need support in fixing Apache errors? Get in contact with us Now.

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.

Не могу решить проблему с ошибками 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

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

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.

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.

Понравилась статья? Поделить с друзьями:
  • Openreceipt ошибка 1
  • Openoffice ошибка считывания ошибка чтения файла
  • Openoffice ошибка bad allocation
  • Openoffice если ошибка
  • Openoffice vlookup ошибка 502