学无先后,达者为师

网站首页 编程语言 正文

nginx中的超时设置,请求超时、响应等待超时等

作者:沉、睡 更新时间: 2022-01-31 编程语言

nginx中的超时设置,请求超时、响应等待超时等

请求超时

http {
    include       mime.types;
    server_names_hash_bucket_size  512;     
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;  #保持
    tcp_nodelay on;
    client_header_timeout 15;
    client_body_timeout 15;
    send_timeout 25;
    include vhosts/*.conf;
}

后端服务器处理请求的时间设置(页面等待服务器响应时间)

location / {
        ...
        proxy_read_timeout 150;  # 秒
        ...
}

原文链接:https://blog.csdn.net/zz975896590/article/details/119990840

栏目分类
最近更新