以下是我在 linux 系统上处理 tcp 和打开文件的当前值:
$cat /proc/sys/fs/file-max # outputs 1,624,164.
$cat /proc/sys/net/ipv4/tcp_max_syn_backlog #outputs 1,048,576
$cat /proc/sys/net/core/somaxconn # output 65535
$ulimit -a # open files = 1,024,000, max user processes = 10,240
Q2:我也将redis中的超时设置为0,tcp-keepalive设置为60,tcp-backlog设置为65535。我正在使用predis,我将超时设置为0,read_write_timeout设置为-1 . 但是,我们会定期收到以下错误。
2015-10-28 11:24:14 406309 cron-web Error while reading line from the server. [tcp://10.0.0.1:6379]
2015-10-28 19:15:13 0 web-billing-3 Error while reading line from the server. [tcp://10.0.0.1:6379]
2015-10-28 19:56:58 0 web-billing-3 Operation timed out [tcp://10.0.0.1:6379]
2015-10-29 10:02:25 437257 web-billing-1 Error while reading line from the server. [tcp://10.0.0.1:6379]
2015-10-29 12:03:54 439897 cron-web Error while reading line from the server. [tcp://10.0.0.1:6379]
2015-10-29 15:06:23 443772 web-billing-3 Error while reading line from the server. [tcp://10.0.0.1:6379]
我尝试将超时时间更改为 300,但仍然无法正常工作。linux 系统参数的设置也如问题 1 所示。所有这些都无济于事。请问有什么建议吗?