Friday, 27 December 2019

NGINX: send_timeout: Set timeout for transmitting response to the client


‘send_timeout’ directive used to set timeout for transmitting a response to the client. The timeout is set only between two successive write operations, not for the transmission of the whole response. If the client does not receive anything within this time, the connection is closed.

Syntax:  send_timeout time;
Default: send_timeout 60s;
Context: http, server, location

nginx.conf
events {
}

http {
    include mime.types;

    # Buffer size for POST submissions
    client_body_buffer_size 10K;
    client_max_body_size 4m;

    # Buffer size for Headers
    client_header_buffer_size 1k;

    client_body_timeout 60s;

    client_header_timeout 60s;

    keepalive_timeout 75s;

    send_timeout 60s;

    server {
        listen 9090;

        server_name localhost;

        location = /about{
            return 200 "Hello Welcome to NGINX";
        }

        location = /not_found{
            return 404 "File can't be found";
        }
    }
}



Previous                                                    Next                                                    Home

No comments:

Post a Comment