Date: Mon, 29 Dec 2003 10:26:55 -0800 From: paul beard <paulbeard@mac.com> To: FreeBSD-questions <questions@Freebsd.org> Subject: kern.maxfiles problem resolved Message-ID: <94B031EA-3A2C-11D8-98AE-000A95BBCCF8@mac.com>
next in thread | raw e-mail | index | archive | help
I figured this out last night but not before I had one spell of catatonia on my system. I used mrtg to graph the increase in file descriptor usage and it made nice straight line, not a curve. That looked suspicious. I also set up a simple while loop in my shell to keep an eye on this. (while [ 1 ] ; do sysctl kern.maxfiles; sleep 60; done ). When that stopped updating at about 6600 files (the max is set at 16384), I rebooted (console was dead). In the process of looking at this, I had noticed that there were a few nmbd (samba) processes in the process table: I expect to see one or two, but not 10 or more. I watched this after rebooting, and sure enough, new processes were spawning ever couple of minutes, and this with no logins to the samba shares. What struck me as odd about this is that the abuse of the file table was being blamed on the wrong UID (80): nmbd doesn't run as the www user, so even if I had been more clueful about fstat, there's a good chance I would have been looking in the wrong places. I killed the samba processes, deinstalled samba, refreshed from cvs and, noting that the version was the same (2.2.8a), I reinstalled with portinstall -P. That seemed to do it. Now openfiles are sitting in the low 200s . . . . I've posted this on my weblog with the relevant image (didn't want to send an attachment to the list). http://www.paulbeard.org/movabletype/archives/001347.html -- Paul Beard <www.paulbeard.org/> paulbeard [at] mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?94B031EA-3A2C-11D8-98AE-000A95BBCCF8>