V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
a1392136
V2EX  ›  问与答

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

  •  
  •   a1392136 · 2019-08-16 16:31:49 +08:00 · 1395 次点击
    这是一个创建于 1686 天前的主题,其中的信息可能已经有所发展或是发生改变。

    前端或 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;
        }
    
    }
    

    }

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5514 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:05 · PVG 14:05 · LAX 23:05 · JFK 02:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.