I have a server where I want to limit the amount of concurrent connections to Samba due to performance reasons. So I have

max connections = 5

Which works fine. However, people who have connected from Windows and just leaving the explorer window open are monopolizing the available connections. So, in the config file, I add:

deadtime = 5

This sort of seems to work, but quite often, just having a folder open in Windows causes Samba to open a lock on that folder (as reported by smbstatus). It seems samba won't kill a connection with a lock, so once again I have idle connections preventing others from gaining access to the share. I've tried setting:

locking = no

into the share, and I can still see the locks and idle connections are not being terminated. Any ideas?

  • Do a test: open samba share from a client and see smbstatus (from the server): You can see the "locked files". Next, close that share (on client) and after 5 minutes (from cmd) do: net use. You'll see "disconnected". – Pol Hallen Jun 4 '14 at 11:37
  • I would suggest also adding keepalive = 30 to more efficiently check for idle clients. From the context it is not clear if readonly is a possibility. Also it is worth checking if setting fstype = fat will help – zeridon Jun 10 '14 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.