send_ Timeout: timeout when sending data to the client.#Configuration section: http, default 75s Ssl_certificate_key /etc/nginx/ssl/portalkey.key Ssl_certificate /etc/nginx/ssl/server.crt '"$http_user_agent" "$http_x_forwarded_for"' Īccess_log /var/log/nginx/access.log main '$status $body_bytes_sent "$http_referer" ' Log_format main '$remote_addr - $remote_user "$request" ' If there is no new request, the TCP connection will be closed If another HTTP request comes, the TCP connection will be reused. If a page has to open and close a TCP connection for each request, it will be a waste of resources_ Timeout is the time that the TCP connection will survive when an HTTP request is completed. HTTP keep alive: every request on a web page is HTTP (pictures, CSS, etc.), and opening HTTP requests requires establishing a TCP connection first.
![change nginx gateway timeout settings change nginx gateway timeout settings](https://www.websitevidya.com/wp-content/uploads/2021/01/website-vidya-logo.png)
If other requests are received from the client, the server will take advantage of the unclosed connection without establishing another connection.
![change nginx gateway timeout settings change nginx gateway timeout settings](https://i.stack.imgur.com/UvEso.png)
HTTP has a keepalive pattern that tells webserver to keep the TCP connection open after processing a request. Understand all the timeout related configurations of nginx, as follows:
#CHANGE NGINX GATEWAY TIMEOUT SETTINGS CODE#
The result is that the status code of the request is 504 gateway time out It is found that a request has been processed in the background for 1 minute. Recently, nginx has been used in the project.