几天以来,我遇到了 ssh2 和 fread php 函数的问题。
在apache错误日志上显示:
ssh2_connect(): Error starting up SSH connection(-9): Error waiting on socket
fread(): Failure 'Error waiting on socket' (-9)
我在网上搜索它但没有成功。
服务器有很多连接,可能是这样吗?
# netstat -anp | wc -l
102407
# netstat -anp | grep TIME_WAIT -c
97444
# cat /proc/sys/net/netfilter/nf_conntrack_count
263737
我的 sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
fs.file-max = 13143781
net.netfilter.nf_conntrack_max = 900000
net.nf_conntrack_max = 900000
net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000
net.ipv4.ip_local_port_range = 1024 65535
net.ipv4.tcp_max_syn_backlog = 4096
net.core.somaxconn = 1024