Setting TCP keepalive for Cyrus daemons

Bron Gondwana brong at fastmail.fm
Sat Feb 13 05:09:05 EST 2010


On Fri, Feb 12, 2010 at 09:45:02AM -0600, Gary Mills wrote:
> I'm willing to add a `keepalive' option to Cyrus master along with the
> setsockopt() system call to enable that setting.  This option could be
> added to the cyrus.conf file for any services that could benefit from
> it. Would this be a reasonable addition to Cyrus?

How does this look?

+{ "tcp_keepalive", 0, SWITCH }
+/* Enable keepalive on TCP connections */
+
+{ "tcp_keepalive_cnt", 0, INT }
+/* Number of TCP keepalive probes to send before declaring the 
+   connection dead (0 == system default) */
+
+{ "tcp_keepalive_idle", 0, INT }
+/* Number of seconds a connection must be idle before keepalive
+   probes are sent (0 == system default) */
+
+{ "tcp_keepalive_intvl", 0, INT }
+/* Number of seconds between keepalive probes (0 == system default) */

A switch to enable keepalive, plus options to edit each of the
tunables.  The full patch is attached - not tested except for
a compile yet.

Bron.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keepalive.diff
Type: text/x-diff
Size: 4207 bytes
Desc: not available
Url : http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20100213/28f6b4ab/attachment-0001.bin 


More information about the Info-cyrus mailing list