"setsockopt(TCP_KEEPCNT) failed: Invalid argument" on Debian Lenny
"setsockopt(TCP_KEEPCNT) failed: Invalid argument" on Debian Lenny
От:
Willy-Bas Loos <willybas@gmail.com>
Дата:
Hi,
I get lots of errors in my logs saying:
LOG: setsockopt(TCP_KEEPCNT) failed: Invalid argument
The corresponding value in postgresql.conf is:
tcp_keepalives_count = 200 # TCP_KEEPCNT;
# 0 selects the system default
I intend to keep that connection alive for 200*75 seconds.
Does anyone know the max for tcp_keepalives_count?
==in man 7 tcp (debian lenny)==
tcp_keepalive_intvl (integer; default: 75)
The number of seconds between TCP keep-alive probes.
tcp_keepalive_probes (integer; default: 9)
The maximum number of TCP keep-alive probes to send
before giving up and killing the connection if no response is obtained
from the other end.
tcp_keepalive_time (integer; default: 7200)
The number of seconds a connection needs to be
idle before TCP begins sending out keep-alive probes. Keep-alives are
only sent when the SO_KEEPALIVE socket
option is enabled. The default value is 7200 seconds (2
hours). An idle connection is terminated after approximately an
additional 11 minutes (9 probes an
interval of 75 seconds apart) when keep-alive is enabled.
Cheers,
WBL
--
"Patriotism is the conviction that your country is superior to all
others because you were born in it." -- George Bernard Shaw
Re: "setsockopt(TCP_KEEPCNT) failed: Invalid argument" on Debian Lenny
От:
Willy-Bas Loos <willybas@gmail.com>
Дата:
O, wait. I think i misinterpreted the man page. I intended to send a maximum of 200 keepalives, but that doesn't seem to be what the value means. The manpage says:"...if no response is obtained from the other end." More elaborate, somewhere on the internet: "When the SO_KEEPALIVE option is enabled, TCP probes a connection that has been idle for some amount of time. If the remote system does not respond to a keepalive probe, TCP retransmits the probe a certain number of times before a connection is considered to be broken." Cheers, WBL On Fri, Dec 11, 2009 at 10:06 AM, Willy-Bas Loos wrote: > Hi, > > I get lots of errors in my logs saying: > LOG: setsockopt(TCP_KEEPCNT) failed: Invalid argument > > The corresponding value in postgresql.conf is: > > tcp_keepalives_count = 200 # TCP_KEEPCNT; > # 0 selects the system default > > I intend to keep that connection alive for 200*75 seconds. > Does anyone know the max for tcp_keepalives_count? > > > > ==in man 7 tcp (debian lenny)== > tcp_keepalive_intvl (integer; default: 75) > The number of seconds between TCP keep-alive probes. > > tcp_keepalive_probes (integer; default: 9) > The maximum number of TCP keep-alive probes to send > before giving up and killing the connection if no response is obtained > from the other end. > > tcp_keepalive_time (integer; default: 7200) > The number of seconds a connection needs to be > idle before TCP begins sending out keep-alive probes. Keep-alives are > only sent when the SO_KEEPALIVE socket > option is enabled. The default value is 7200 seconds (2 > hours). An idle connection is terminated after approximately an > additional 11 minutes (9 probes an > interval of 75 seconds apart) when keep-alive is enabled. > > > Cheers, > > WBL > > -- > "Patriotism is the conviction that your country is superior to all > others because you were born in it." -- George Bernard Shaw > -- "Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw