Open yangtaoThirdBoy opened 4 years ago
使用你的配置文件,没有发现内存泄漏。
1、确定连接全部断开后再统计你的内存。
2、统计内存,请使用 ps -aux | grep nginx
看 tengine worker的内存占用是否持续增长即可。
实际的业务场景会有部分tcp连接重连的情景(上下线),所以模拟测试的过程,有一半的tcp连接一直保持连接,另外一半不断重连。 如果全部tcp连接断开之后,内存确实释放了
内存统计信息还看了nginx work进程的详细信息(/proc/nginx_work_pid/status);和free -m 查看到的内存使用情况基本一致
试图使用tengine实现TCP Proxy, 在工作过程中client与server之间必须通过proxy维持tcp长连接
测试环境
error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid;
worker_rlimit_nofile 65535;
error_log /dev/stdout error;
events { use epoll; worker_connections 65535; multi_accept on; }
stream { tcp_nodelay on; upstream backend_chash { server 10.0.3.220:30022;
keepalive 1024;
}