Re: Setting TCP keepalive for Cyrus daemons

2011-07-04 Thread Andy Bennett
Hi, >> I just noticed something else when I went to apply the patch. I would >> have added the options to cyrus.conf so a typical entry would change >> from: >> >> imap cmd="imapd" listen="imap" proto="tcp4" prefork=0 maxchild=6000 >> >> to: >> >> imap cmd="imapd" listen="imap" proto="tcp4"

Re: Setting TCP keepalive for Cyrus daemons

2011-07-04 Thread Bron Gondwana
On Mon, Jul 04, 2011 at 09:14:11AM -0500, Gary Mills wrote: > > Why didn't one of you scumbags code review me and tell me > > how bogus this is?? > > Because it was so different from the patch that I submitted that I > assumed it addressed a different problem. Excuses, excuses. Well, it's fixed

Re: Setting TCP keepalive for Cyrus daemons

2011-07-04 Thread Gary Mills
On Thu, Jun 30, 2011 at 10:39:29PM +0200, Bron Gondwana wrote: > On Sat, Feb 13, 2010 at 09:09:05PM +1100, Bron Gondwana wrote: > > +if (config_getint(IMAPOPT_TCP_KEEPALIVE_CNT)) { > > +r = setsockopt(be->sock, SOL_TCP, TCP_KEEPCNT, > > &optval, optlen); > > +

Re: Setting TCP keepalive for Cyrus daemons

2011-06-30 Thread Bron Gondwana
On Sat, Feb 13, 2010 at 09:09:05PM +1100, Bron Gondwana wrote: > +if (config_getint(IMAPOPT_TCP_KEEPALIVE_CNT)) { > +r = setsockopt(be->sock, SOL_TCP, TCP_KEEPCNT, &optval, > optlen); > +if (r < 0) { > +syslog(LOG_ERR,

Re: Setting TCP keepalive for Cyrus daemons

2010-02-18 Thread Gary Mills
On Sun, Feb 14, 2010 at 09:30:49AM -0600, Gary Mills wrote: > > I just noticed something else when I went to apply the patch. I would > have added the options to cyrus.conf so a typical entry would change > from: > > imap cmd="imapd" listen="imap" proto="tcp4" prefork=0 maxchild=6000 > > to:

Re: Setting TCP keepalive for Cyrus daemons

2010-02-14 Thread Gary Mills
On Sun, Feb 14, 2010 at 08:56:29AM +1100, Bron Gondwana wrote: > On Sun, Feb 14, 2010 at 08:38:34AM +1100, Bron Gondwana wrote: > > > One thing to watch is that only SO_KEEPALIVE is standard. The other > > > three symbols: TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL only exist > > > in some opera

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Bron Gondwana
On Sat, Feb 13, 2010 at 08:58:50PM -0500, Wesley Craig wrote: > On 13 Feb 2010, at 09:50, Brian Awood wrote: > > I've had a patch against lmptd in bugzilla for a while; > > https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3158 > > I think the code probably just needs to be audited, to find the > >

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Wesley Craig
On 13 Feb 2010, at 09:50, Brian Awood wrote: > I've had a patch against lmptd in bugzilla for a while; > https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3158 > I think the code probably just needs to be audited, to find the > places where > setting a read timeout on the stream would be sufficient

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Bron Gondwana
On Sun, Feb 14, 2010 at 08:38:34AM +1100, Bron Gondwana wrote: > > One thing to watch is that only SO_KEEPALIVE is standard. The other > > three symbols: TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL only exist > > in some operating systems. They have global settings but don't have > > per-socket

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Bron Gondwana
On Sat, Feb 13, 2010 at 10:00:52AM -0600, Gary Mills wrote: > On Sat, Feb 13, 2010 at 09:09:05PM +1100, Bron Gondwana wrote: > > 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

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Gary Mills
On Sat, Feb 13, 2010 at 09:09:05PM +1100, Bron Gondwana wrote: > 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.c

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Brian Awood
I've had a patch against lmptd in bugzilla for a while; https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3158 I think the code probably just needs to be audited, to find the places where setting a read timeout on the stream would be sufficient. -Brian On Friday 12 February 2010 16:59:31 Paul M

Re: Setting TCP keepalive for Cyrus daemons

2010-02-13 Thread Bron Gondwana
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

Re: Setting TCP keepalive for Cyrus daemons

2010-02-12 Thread Gary Mills
On Fri, Feb 12, 2010 at 03:59:31PM -0600, Paul M Fleming wrote: > Shouldn't these client connections already be handled by the poptimeout & > timeout options? unless you have it set to zero... They don't seem to be. We're using the default timeout setting. It seems to have no effect on front e

Re: Setting TCP keepalive for Cyrus daemons

2010-02-12 Thread Paul M Fleming
Shouldn't these client connections already be handled by the poptimeout & timeout options? unless you have it set to zero... We have had problems within the murder (old code had several spots where murder front <-> back communications could deadlock).. On Sat, 13 Feb 2010, Bron Gondwana wrote:

Re: Setting TCP keepalive for Cyrus daemons

2010-02-12 Thread Bron Gondwana
On Fri, Feb 12, 2010 at 09:45:02AM -0600, Gary Mills wrote: > I've been noticing idle pop3d processes on our Cyrus front end server > for some time. These should be transient. One that was several days > old had an established TCP connection to a wireless client that had > disappeared. Presumabl

Setting TCP keepalive for Cyrus daemons

2010-02-12 Thread Gary Mills
I've been noticing idle pop3d processes on our Cyrus front end server for some time. These should be transient. One that was several days old had an established TCP connection to a wireless client that had disappeared. Presumably the client never closed the connection. Setting TCP keepalive on