I'm getting lots of Samba "too many open files" errors. How can I troubleshoot? I'm using Mac OS X Snow Leapord. My iMac's hard drive has been getting unexpectedly full, and I finally tracked the problem down to a huge file: private/var/log/samba/log.smbd.old, weighing in at 400GB.

I just ran tail -100 log.smbd.old to see the last 100 lines of that log file. What I see is a ton of "too many open files" errors.

This is a work machine. I do share files with other Mac users, and also access a shared Windows drive via Samba.

How can I troubleshoot these errors so the log file doesn't get filled with them?
Now I'm no kernel expert, but I think that you might be running into the fact that the default value for the maxflies kernel parameter is 256.  You can show your current value for this parameter like this:

[dwayne | ~] $ launchctl limit maxfiles
    maxfiles    256            unlimited 


I think if you put a line similar to this in a file /etc/launchd.conf (you might have to create the file if it doesn't already exist):

limit maxfiles 2048 unlimited


and reboot, you will see the new value, and hopefully avoid the situation you're running into.

Dwayne