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