author | Marc Fournier <marc.fournier@camptocamp.com> | |
Sat, 13 Feb 2016 10:51:23 +0000 (11:51 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 9 Aug 2016 09:05:37 +0000 (11:05 +0200) | ||
commit | 727a4b977ec6549d94da3f694bf3fe8b0121db58 | |
tree | 503fdd4b7dc20a80cddc315e63096583a49e98e6 | tree | snapshot |
parent | 7a65aadcc432d3341f5cca816c6a157b1b9d6116 | commit | diff |
daemon/common.[ch]: add set_sock_opts() function
Enables the TCP keepalive mechanism on a given socket.
This would typically be used on sockets opened by write plugins
which submit data to a remote server.
Up to now, collectd fails to notice when a remote server dies without
properly closing the network connection, leading to more and more memory
getting allocated as the values pile up in the write queue.
The keepalive values are proportional to the configured `Interval`. The
first probe is emitted `10 x Interval` seconds after the last TCP packet
was seen, and then once per `Interval` until the threshold defined by
the OS is reached.
See: http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#checkdeadpeers
Enables the TCP keepalive mechanism on a given socket.
This would typically be used on sockets opened by write plugins
which submit data to a remote server.
Up to now, collectd fails to notice when a remote server dies without
properly closing the network connection, leading to more and more memory
getting allocated as the values pile up in the write queue.
The keepalive values are proportional to the configured `Interval`. The
first probe is emitted `10 x Interval` seconds after the last TCP packet
was seen, and then once per `Interval` until the threshold defined by
the OS is reached.
See: http://www.tldp.org/HOWTO/html_single/TCP-Keepalive-HOWTO/#checkdeadpeers
src/daemon/common.c | diff | blob | history | |
src/daemon/common.h | diff | blob | history |