ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 1、Nginx--keepalive 的配置 1.1 从 Client 到 Nginx 的连接是长连接; ![](https://img.kancloud.cn/9d/45/9d45ac137f109fa517fdc7f3d6686bae_805x743.png) 1.2 从 Nginx 到 Server(upstream) 的长连接 `vim /www/server/panel/vhost/nginx/leveling_www_dyhjw_com.conf` 增加:` keepalive 300; ` ``` upstream www_dyhjw_com { #ip_hash; server 192.168.0.203:80 max_fails=2 fail_timeout=180s weight=10; server 192.168.0.198:80 max_fails=2 fail_timeout=180s weight=10; server 192.168.0.201:80 max_fails=2 fail_timeout=180s weight=10; server 192.168.0.212:80 max_fails=2 fail_timeout=180s down; server 192.168.0.204:80 max_fails=2 fail_timeout=180s weight=10; sticky name=bt_route expires=12h httponly; # 这个参数非常重要 keepalive 300; } ```