HTTP Erro 408 Request timeout


What is Error 408?
The Web server (running the Web site) thinks that there has been too long an interval of time between 
1) the establishment of an IP connection between the client (e.g. your Web browser ) and the server and 
2) The receipt of any data on that socket, so the server has dropped the connection. The socket connection has actually been lost - the Web server has 'timed out' on that particular socket connection. 

The request from the client must be repeated - in a timely manner

408 errors are often difficult to resolve. They typically involve one-off variations in system workload or operations

408 errors in the HTTP cycle
Any client (e.g. your Web browser) goes through the following cycle when it communicates with the Web server:


  1. Obtain an IP address from the IP name of the site (the site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNS's).
  2. Open an IP socket connection to that IP address.
  3. Write an HTTP data stream through that socket.
  4. Receive an HTTP data stream back from the Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.

This error occurs in the final step above when the client receives an HTTP status code that it recognizes as '408

This error is because of a timeout. On the face of it, it looks as though the server is timing out. So,  the server side to see how long the call is taking. However, there's a chance that it may just be a client side problem because I sometimes get this error when I pause the debugger on the client side. i.e. the Request is sent to the server, the server sends the Response back, but the client doesn't accept it. I know this sounds funny, and I haven't been able to figure out why this happens myself. Anyway, you can try setting the timeout to something much larger in the WebRequest on the client side:

request.Timeout = 60000

or set the Execution Timeout at web.config file of httpRuntime tag.

    <httpRuntime executionTimeout="300" />

by default it is 110 seconds and you can try to increase this value and verify.



Comments

Popular posts from this blog

Email Sending through O365 using OAuth Protocol

IISRESET vs App Pool Recycling ?

Deploy .Net6.0 Web api with docker