What a smbc_new_context timeout does and is there a way to change it?

Vladimir Marek Vladimir.Marek at oracle.com
Wed Dec 9 14:08:52 UTC 2015


Hi,

we have a customer who reports that sometimes his smbget processes fail
with error message:

Can't read 32768000 bytes at offset 7700480000, file smb://...


I have traced it to a timeout in smbc_free_context in
source3/libsmb/libsmb_context.c


smbc_new_context(void)
{
...
smbc_setTimeout(context, 20000);
...


This happens for samba 3.6, but I believe that the same code is used in
samba 4.


If I increase the timeout the problems with smbget go away.

I would like to ask for help

a) what is this timeout doing?
I have suspicion that it's related to network operations and since
customer is transferring huge amounts of data the network might be
saturated.


b) Is there a way to modify this timeout without touching the code, ie.
from configuration file? I haven't been able to find a way - I believe
it's set to be 20 seconds.


c) If we accept that the way to fix the problem is to increase the
timeout, what would be the preferred way to do it? Just increase the
number? Make it configurable? I don't know how difficult is to add
configuration variable.


My next steps are to find out how big the timeouts need to be (I have
set it to 10 minutes as a first try) and try to find out more about the
timeout purpose.


Thank you
-- 
	Vlad



More information about the samba-technical mailing list