服务器超时时间修改
server:
tomcat:
connection-timeout: 6000 # 单位毫秒
nginx调整超时时间
打开nginx.conf,在代理的路径后面加代理超时时间,例如:
server
{
listen 8080;
server_name myserver;
index index.html index.htm index.php;
root /home/PROJECT/dist;
proxy_connect_timeout 60s; # 上游服务器建立连接的超时时间
proxy_read_timeout 60s; # 从上游服务器读取数据的超时时间
proxy_send_timeout 60s; # 向上游服务器发送请求的超时时间
location / {
……
}
}
如果设置这个不管用或者希望所有项目都一起调整,那么可以修改proxy.conf中的超时时间,就是上面这几个参数。