💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 长连接 1. 客户端到nginx : keepalive_timeout 65; 2. nginx到上游服务(upstream) : keepalive 32; | keepalive_requests 100; | keepalive_timeout 60s; ## proxy_connection_timeout nginx到上游服务器的连接超时时间;三次握手的超时时间; 语法: ``` proxy_connection_timeout time; ``` 默认值: ``` proxy_connection_timeout 60s; ``` 上下文: ``` http | server | location ``` ## proxy_socket_keepalive 比较操作系统底层.平时不用;如果设为on,就是直接复用TCP的长连接; 语法: ``` proxy_socket_keepalive on | off; ``` 默认值: ``` proxy_socket_keepalive off; ``` 上下文: ``` http | server | location ``` ## proxy_send_timeout 代理nginx没有向上游服务器发送内容的超时时间; 语法: ``` proxy_send_timeout time; ``` 默认值: ``` proxy_send_timeout 60s; ``` 上下文: ``` http | server | location ``` ## proxy_ignore_client_abort 如果客户端给代理服务器(nginx)建立的连接已经断开了,那么代理服务器是不是忽略客户端发送给应用服务器的请求;如果是off的话,那么应用服务器会正常响应后再去关闭; 语法: ``` proxy_ignore_client_abort on | off; ``` 默认值: ``` proxy_ignore_client_abort off; ``` 上下文: ``` http | server | location ```