a1392136
V2EX  ›  问与答

nginx 请求后端服务,频繁卡 1 分钟

  •  
  •   a1392136 · Aug 16, 2019 · 2221 views
    This topic created in 2507 days ago, the information mentioned may be changed or developed.

    前端或 postman 调用 nginx 代理的后端接口,会频繁的卡一分钟( 1m 0.16s ,正常请求 100ms 左右)。

    服务端是在 100ms 左右就处理完成,并返回了响应日志,直接请求后端接口也是正常的 100ms

    nginx 配置:

    #user nobody; worker_processes 4;

    events { use epoll; worker_connections 65535; }

    http { include mime.types; default_type application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
    #access_log  logs/access.log  main;
    
    sendfile        on;
    #tcp_nopush     on;
    
    underscores_in_headers on;
    
    keepalive_timeout  180;
    
    #gzip  on;
    include cnf/upstream_*.cnf;
    server {
        listen       80;
        server_name  localhost;
        include cnf/pathrule.cnf;
    
        #charset koi8-r;
    
        #access_log  logs/host.access.log  main;
    
        location / {
            root   html;
            index  index.html index.htm;
        }
    
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    
    }
    

    }

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2879 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:22 · PVG 16:22 · LAX 01:22 · JFK 04:22
    ♥ Do have faith in what you're doing.