ap-wtioit Posted October 24, 2022 Share Posted October 24, 2022 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. Quote Link to comment
ap-wtioit Posted October 24, 2022 Author Share Posted October 24, 2022 (edited) 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 October 24, 2022 by ap-wtioit only smb2 max trans is needed as an option Quote Link to comment
Recommended Posts
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.