SMB: Broken Pipe, After upgrade to 6.11.1


Recommended Posts

After we upgraded Unraid to 6.11.1 (from 6.9.2) it seems no longer possible to retrieve directories with many entries via samba.

 

I'm getting "Broken pipe" from Ubuntu Client after a bit more than 20 seconds.

 

Listing the directory on a terminal directly on unraid takes about 30 seconds.

 

Is there any way of increasing the timeouts for directory listings in samba again? (as it seems 6.9.2 had way longer timeouts)

 

The directory contents are created via Ubuntu Deja Dup backup so i cannot directly change the directory structure in there.

Screenshot from 2022-10-24 10-36-59.png

Link to comment

Current findings:

With wireshark i could confirm that the client (gvfs-smb) is terminating the find request after 20seconds (as documented as default timeout for smb-client). Unfortunately i couldn't find any url options for smb:// urls that would allow me to increase the timeout on client side. Also there seems no system wide option available that wouldn't need to be specified as comand line arg for smb-client.

 

Workarround:

add the following as extra configuration
 

# split answers for directory listings into 256K chunks to avoid client timeout for directories with many elements
smb2 max trans = 262144

 

This splits the response for SMB2_FIND_ID_BOTH_DIRECTORY_INFO * into 256kb chunks for the answer where the first chunk is available after 0.3 seconds avoiding the 20s timeout.

Edited: leave only smb2 max trans as extra configuration, add slightly higher value than 64k, that still gives us an smb2 find response roughly every 1.5 seconds to avoid client timeout (on our system)

Edited by ap-wtioit
only smb2 max trans is needed as an option
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.