How to avoid client timeout.(SMB2 ECHO Request)

Stefan (metze) Metzmacher metze at
Fri Feb 7 05:57:23 MST 2014

Am 07.02.2014 07:00, schrieb sandeep nag:
> There is write/truncate request from the client and processing in samba VFS
> plugin is taking longer time(which is expected as per our VFS plugin
> processing time).
> The client meanwhile sends many SMB ECHO requests
> (every 30 seconds (not sure)). However, they sit in the socket because the
> smbd
> is now stuck and will only process the ECHOs after the truncate. Because
> of this, I am seeing client time outs.
> If the ECHO could be responded promptly, then the client would not time.
> How can this be done, please guide me in implementing/coding/undertanding
> this.

Which client sends SMB2 Echo requests? Can you provide a capture?
I thought Windows clients would rely on TCP keepalives for SMB2.

For SMB1 we have the "async smb echo handler" option. From man smb.conf:

       async smb echo handler (G)

           This parameter specifies whether Samba should fork the async
smb echo handler. It can be beneficial if your
           file system can block syscalls for a very long time. In some
circumstances, it prolongs the timeout that
           Windows uses to determine whether a connection is dead.

           Default: async smb echo handler = no


More information about the samba-technical mailing list