关闭防火墙
chkconfig iptables off
增大系统打开文件句柄数量
vi /etc/security/limits.conf
在# End of file上面一行加入
* soft nofile 65536
* hard nofile 65536
如下图:
保存后,重启操作系统。用ulimit -a 命令查看是否修改成功。如下图:
Linux环境下:在/etc/sysctl.conf文件中加入配置
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_tw_recycle=1
执行命令 sysctl -p
修改完后,不用重启机器。