HTTP Status 504

I get the following error when my win32 (C #) application calls web services.

The request failed with HTTP status 504: Gateway timeout server response timeout. 

I understand "I think" that this is due to the fact that the request up does not receive a response in a timely manner.

But is that my question? How to change app.config settings in my win32 application to provide more time to process its data. I assume that I require that these changes be made to my application settings, since ws web services and IIS hosting are configured with extended time intervals.

Look ahead and answer in advance.

Scott

+56
Nov 04 '08 at 11:05
source share
6 answers

You can not. The problem is not that your application is impatient and at times; the problem is that the intermediate proxy is impatient and chronic. "The server, acting as a gateway or proxy, did not receive a timely response from the upstream server specified in the URI." ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5 ) Most likely, this indicates that the source server has some kind of problem, so it does not respond quickly to the redirected request .

Possible solutions, none of which are likely to make you happy:

  • Increase the timeout for the proxy (if it is under your control)
  • Make a request to another server (if there is another server with the same data)
  • Make your request different (if possible) so that you request less data at a time
  • Try again when there are no problems on the server.
+38
Dec 13 '11 at 19:08
source
— -

CheckUpDown has a good explanation of 504 error :

The server (not necessarily the web server) acts as a gateway or proxy for the client to complete the request (for example, your web browser or our CheckUpDown robot) to access the requested URL. This server did not receive a timely response from the upstream server it was accessing to process your HTTP request.

This usually means that the upstream server is down (there is no response to the gateway / proxy), and not that the upstream server and the gateway / proxy do not agree with the communication protocol.

This problem is fully related to the slow IP connection between internal computers, possibly including a web server. Only people who set up a network on a site hosting a web server can solve this problem.

+16
Nov 04 '08 at 11:19
source

Assume access to proxy server A (for example, nginx), and server A forwards the request to another server B (for example, tomcat).

If this process continues for a long time (longer than the timeout for the proxy server to read), A still has not received a completed answer B. This happens.

for nginx, you can set the proxy_read_timeout property (in location) to solve it. But this is usually not a good idea if you set the value too high. This may hide the real mistake. Better to improve the design to really solve this problem.

+2
May 18 '16 at 9:23
source

If your ASP.Net 5 (now known as ASP.Net Core v1) provides project.json in the "commands" section for each site you host, the listening port of the Kestrel proxy server is different between sites, otherwise one site will be different will return a 504 gateway timeout.

  "commands": { "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5090" }, 
+1
Jan 28 '16 at 20:26
source

One thing I observed regarding this error is that it appears only for the first response from the server, which in the case of HTTP should be a confirmation response. As soon as an immediate response is sent from the server to the gateway, if time is required after the main response, this does not give an error. The key point here is that the first response to a server request should be fast.

+1
Apr 27 '16 at 16:30
source

Perhaps this is about the settings of your network proxy. See what http://rapid-i.com/rapidforum/index.php?topic=4436.0

0
Jun 06 '13 at 19:27
source



All Articles