[Samba] deadtime/keepalive not working as expected

Volker Lendecke vl at samba.org
Thu Nov 3 14:36:01 UTC 2016


On Tue, Nov 01, 2016 at 05:09:34PM -0700, Jeremy Allison via samba wrote:
> On Tue, Nov 01, 2016 at 05:16:47PM -0500, Ed Siefker via samba wrote:
> > My expectations are probably wrong, but I had to manually kill a process
> > to unlock a file when I think it should have killed itself.
> > 
> > I have deadtime set to 15 and keepalive at default (300).  I opened a file on
> > my server in Excel, then shut down the machine.  Hours later someone
> > tells me the file is locked.
> > 
> > Shouldn't keepalive have detected that the machine was off in 5 minutes?
> > Shouldn't deadtime have disconnected the process and unlocked the file
> > 15 minutes later?  Do I misunderstand what is going on?  Thanks
> 
> Once the client is dead the TCP keepalive's should
> detect the socket is down and thus shut off the servicing
> smbd. Check this by doing a wireshark capture and a
> debug level 10 on that smbd.

Is that still valid for SMB2? On Linux I always use socket options for
that these days:

socket options = TCP_NODELAY TCP_KEEPCNT=4 TCP_KEEPIDLE=240 TCP_KEEPINTVL=15

Volker



More information about the samba mailing list