Linux

apr_socket_recv:連接超時(110)

  • May 14, 2018

我有 nginx/php-fpm 正在執行,但我得到以下資訊:

apr_socket_recv: Connection timed out (110)

這是一個巨大的大盒子。16 核/24GB 記憶體

我需要調整什麼來增加允許的連接?

編輯:

剛剛在 dmesg 中找到了這個

nf_conntrack: table full, dropping packet

看起來我需要提高這些值。

固定:

net.netfilter.nf_conntrack_generic_timeout = 12
net.netfilter.nf_conntrack_tcp_timeout_syn_sent = 12
net.netfilter.nf_conntrack_tcp_timeout_syn_recv = 12
net.netfilter.nf_conntrack_tcp_timeout_established = 2000
net.netfilter.nf_conntrack_tcp_timeout_fin_wait = 12
net.netfilter.nf_conntrack_tcp_timeout_close_wait = 12
net.netfilter.nf_conntrack_tcp_timeout_last_ack = 12
net.netfilter.nf_conntrack_tcp_timeout_time_wait = 10
net.netfilter.nf_conntrack_tcp_timeout_close = 8
net.netfilter.nf_conntrack_tcp_timeout_max_retrans = 30
net.netfilter.nf_conntrack_tcp_timeout_unacknowledged = 30
net.netfilter.nf_conntrack_tcp_loose = 1
net.netfilter.nf_conntrack_tcp_be_liberal = 0
net.netfilter.nf_conntrack_tcp_max_retrans = 3
net.netfilter.nf_conntrack_udp_timeout = 12
net.netfilter.nf_conntrack_udp_timeout_stream = 18
net.netfilter.nf_conntrack_icmp_timeout = 8
net.netfilter.nf_conntrack_acct = 1
net.netfilter.nf_conntrack_max = 1048576
net.netfilter.nf_conntrack_count = 7645
net.netfilter.nf_conntrack_buckets = 16384
net.netfilter.nf_conntrack_checksum = 1
net.netfilter.nf_conntrack_log_invalid = 0
net.netfilter.nf_conntrack_expect_max = 256

引用自:https://serverfault.com/questions/477749