Comment 4 for bug 462172

Revision history for this message
Kai Giebeler (kai-giebeler) wrote : Re: samba "Too many files are currently in use."

I receive the same problem:
Copying a few thousand files from a Samba-share (Ubuntu 9.10, Samba 3.4.0) to Windows 7-Client (Ultimate x64) produces the error message mentioned above after a few seconds. It's a Windows Dialog. The exact Message is:
"Too many Files are currently in use. Quit one or more programs, and then try again."
I can choose between [Try again], [Skip] and [Cancel]

Waiting a few seconds and then choosing [Try again] copies a few more files until the message reappears. the longer I wait the longer it copies without interruption.

Executing the command metioned above results in
"fs.file-max = 196754"
That's 10 times bigger than the total amount of files to be copied.

One thing I noticed:
"sudo smbstatus"
shows only two open files while idling but about 1013 open files in the moment when the message appears. While the dialog is open, the list shrinks continuously. After a few seconds it's nearly empty again.

I didn't notice the problem on Ubuntu 9.04 using Windows XP Professional 32-Bit as client.

A simple manual copy using the Windows GUI is basically possible, but other tools consuming a big amount of shared files seem to be unable to handle the exception properly (e.g. 7-zip crashes completely).

It seems that Samba doesn't close opened files fast enough. I cannot decide whether Windows forgets to close the files properly or Samba ignores the close event.

An (obfuscated) example line of an opened file in smbstatus:
"1920 1000 DENY_WRITE 0x20089 RDONLY EXCLUSIVE+BATCH /home/me My Files/my file.txt Wed Nov 4 21:42:44 2009"

It's a big problem for me since I'm totally unable to work with projects persisting of 1000+ files.
The problem can be permanently reproduced in my case (1 GB/s LAN). Network load is around 1 % except for some 20 % peaks. The test project consists of many small text files (source code).

If there's any more information I can provide to solve this problem, please let me know.

Kind regards

Kai