Open StephenAtty opened 11 years ago
It does close the directory handler after having scanned it. However the libdispatch version is coming with massive parallelism in scanning directories so there is a remote chance you ran out of file descriptors for a very huge library I guess.
What system you're on? Anything else running that may allready allocate a whole bunch of file descriptors?
On linux use lsof or try #sysctl fs.file-nr
in a shell while a scan is running. sysctl command will give three numbers with the first one being number of allocated; second number of allocated but unused and third number the system max limit.
That may help revealing what is going on..
I was doing a complete library rebuild. So what I did was shut it down, Trash the DB, rename the root folder for my library and then move the directories back in in smaller blocks. I've got samba and some other stuff running on the server (ubuntu 12.0.4) but I should still have about 27,000 file descriptors available.
I'm sure its the libdispatch doing it - not that its going to get fixed as the forked-daapd project seems to be pretty much dead....
See #40 for a potential solution
I've got a lot of directories in my library and it looks like forked daapd keeps opening directories to scan then but doesn't close them and I end up with lots of entries like this in my log:
[2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Albums/Oasis - 1994 - Definitely Maybe (2 CD Australia Edition)/CD1: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Albums/Oasis - 2000 - Standing on the Shoulder of Giants/CD2 - Bonus CD: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Albums/Oasis - 2000 - Standing on the Shoulder of Giants/CD1: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Compilations/Oasis - 2010 - Time Flies...1994-2009/CD4 - iTunes Live London Festival: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Compilations/Oasis - 2010 - Time Flies...1994-2009/CD2: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Compilations/Oasis - 2010 - Time Flies...1994-2009/CD1: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Compilations/Oasis - 2006 - Stop The Clocks/CD2: Too many open files [2013-06-01 13:19:26] scan: Could not open directory /webstuff/shares/music/Rock - Pop/Oasis/Compilations/Oasis - 2006 - Stop The Clocks/CD1: Too many open files\