[Dovecot] dsync timeout?

Sean Kamath kamath at moltingpenguin.com
Sat Feb 2 10:07:31 EET 2013


On Feb 1, 2013, at 8:09 AM, micah anderson <micah at riseup.net> wrote:

> Sean Kamath <kamath at moltingpenguin.com> writes:
> 
>> On Jan 30, 2013, at 3:46 PM, micah anderson <micah at riseup.net> wrote:
>>> Seems that only the above process was still around and no other dsync
>>> processes. I have three machines that all have this happening it seems.
>>> 
>>> I wonder if there is a ssh configuration option I could set to make
>>> these die off.
>> 
>> If the ssh process isn't sending anything, and just waiting for read()s, and keepalives are turned off, the SSH session might never know the remote side is long gone. . .
>> 
>> If any data were transmitted, it would discover the remote side is turned off.
>> 
>> See man ssh_config and the option TCPKeepAlive.
>> 
>> BTW: Since it's not on the command line, it's likely in /etc/ssh_config or /etc/ssh/ssh_config.  Or ~/.ssh/config.
> 
> In /etc/ssh/sshd_config on the server I'm sending to, TCPKeepAlive yes
> is set.

Did you check ~/.ssh/config for the user running the dsync?

> The default on this system, according to the man page, seems to be to
> have TCPKeepAlive set. 
> 
> Perhaps I should set ServerAliveInterval?


Perhaps.  That states how long to send the KeepAlive packet.

There are many settings that can affect this, including

ServerAliveCountMax
ServerAliveInterval
TCPKeepAlive

There is also the sshd_config settings

ClientAliveCountMax
ClientAliveInterval
TCPKeepAlive

At this point, I think you need to see what's happening on both sides of the SSH connection.  I don't recall what system you're on, but for linux you can use netstat -anp (as root) to find out what process is connected to which port, and on linux and other systems you can use lsof to find out what is connected to ports.

Maybe the TCP port is open and valid and there's no data coming through?  This can happen if, for example, you have any port forwarding or X session forwarding through SSH (i.e., if ssh -X is the default) and something accidentally is holding that port open (this can happen in your regular shell if, for example, you have something open an X application and you forget (because you backgrounded it) -- you're logout of the server will hang until the X applications are closed.  Note that it isn't always a visible client that will do this. :-().

Sean




More information about the dovecot mailing list