Page 1 of 1

Too many open files error. [Windows]

Posted: December 5th, 2014, 6:40 am
by aaronkuchma
I've been getting errors like the following since upgrading to Sab 0.7.20

ERROR: [05/Dec/2014:06:31:22] Traceback (most recent call last): File "cherrypy\_cprequest.pyo", line 98, in run File "cherrypy\_cprequest.pyo", line 58, in __call__ File "cherrypy\_cptools.pyo", line 158, in _wrapper File "cherrypy\lib\static.pyo", line 199, in staticdir File "cherrypy\lib\static.pyo", line 146, in _attempt File "cherrypy\lib\static.pyo", line 72, in serve_file IOError: [Errno 24] Too many open files: 'C:\\Program Files (x86)\\SABnzbd\\interfaces\\Plush\\templates\\static\\stylesheets/colorschemes/gold/images/nav/help.png'

It seems to pop up when the NzbToMedia script is running, and there is an NZB that gets added (because of a failed download for instance, or because I've recently added a show in SickRage). SickRage and NzbToMedia were working well together prior to the 0.7.20 update.

Since 0.7.20 I've also configured sab to report feedback to Usenet-Crawler.

Anyone have any idea what might be causing the too many files open error? It goes away after a restart of Sab, so I'm guessing Sab is the application holding on to too many file handles.

Re: Too many open files error.

Posted: December 5th, 2014, 9:39 am
by shypike
aaronkuchma wrote: Anyone have any idea what might be causing the too many files open error? It goes away after a restart of Sab, so I'm guessing Sab is the application holding on to too many file handles.
If so, more users would be complaining.
The limits are quite high on Windows.
Downgrade if you think SABnzbd 0.7.20 is the problem.

Re: Too many open files error. [Windows]

Posted: December 5th, 2014, 10:37 am
by sander
As Shypike says.

Furthermore: "meten is weten", so measure which files are open. For Windows the method is:

Find CMD (via Start Search), then Run as Administor, then type

Code: Select all

openfiles /local ON
Then reboot your system
Find CMD (via Start Search), then Run as Administor, then type

Code: Select all

openfiles /query
and find which process has which files open.

Oneliner to find files that are open by SABnzbd:

Code: Select all

C:\>openfiles /query | find /I "sabnzbd"
16    SABnzbd.exe          C:\Windows
28    SABnzbd.exe          C:\Program Files (x86)\SABnzbd
188   SABnzbd.exe          C:\Windows\SysWOW64\nl-NL\KernelBase.dll.mui
236   SABnzbd.exe          C:\Windows\SysWOW64\nl-NL\setupapi.dll.mui
512   SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
768   SABnzbd.exe          C:\..\AppData\Local\sabnzbd\logs\sabnzbd.log
772   SABnzbd.exe          C:\..\AppData\Local\sabnzbd\logs\sabnzbd.log
840   SABnzbd.exe          C:\..ccf1df_5.82.7601.18201_none_ec80f00e8593ece5
872   SABnzbd.exe          C:\..4ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
1272  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
1280  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
1288  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
1300  SABnzbd.exe          C:\..4ccf1df_6.0.7601.17514_none_41e6975e2bd6f2b2
1320  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
1348  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db
1508  SABnzbd.exe          C:\..\AppData\Local\sabnzbd\admin\history1.db

C:\>
And to count:

Code: Select all

C:\>openfiles /query | find /C /I "sabnzbd"
16

HTH