This article is a mirror article of machine translation, please click here to jump to the original article.

View: 790|Reply: 0

[Web] Nginx emerges with a 504 Gateway Time-out solution

[Copy link]
Posted on 2025-7-4 16:46:07 | | | |
Requirements: Nginx reverse proxy to dotnet interface application, due to the special situation of one interface, the response takes about 90 seconds, and the client calls the Nginx interface will report a 504 gateway time-out error.

The process is as follows:



fastcgi_connect_timeout:fastcgi connection timeout, default 60 seconds
fastcgi_send_timeout:nginx process sends a timeout time for the request process to the fastcgi process, the default value is 60 seconds
fastcgi_read_timeout:fastcgi process sends the timeout time for the output process to the nginx process, the default value is 60 seconds

Vernacular explanation:

proxy_connect_timeout 1800s; #nginx跟后端服务器连接超时时间 (Proxy connection timeout)
proxy_send_timeout 1800s; #后端服务器数据回传时间 (proxy send timeout)
proxy_read_timeout 1800s; #连接成功后, backend server response time (proxy receiving timeout)

The solution is as follows:

Configure according to your actual situation.




Previous:【Turn】eD2k network, review the rise and fall of electric donkeys
Next:.NET/C# Beautiful WPF UI interface library
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com