Error ValueError: too many file descriptors in select() - Please Help

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
patrick8996
Newbie
Newbie
Posts: 4
Joined: November 30th, 2024, 5:24 am

Error ValueError: too many file descriptors in select() - Please Help

Post by patrick8996 »

Hello all,

I have been running Sabnzdb for years and years now and I have never been presented with an issue. I recently added and renewed some servers during black Friday and since then I have been presented with an error when downloading anything. This causes the downloader to crash and I am stuck in a reboot cycle.

The error is as follows:

"Fatal error in Downloader
Traceback (most recent call last):
File "sabnzbd\downloader . py", line 654, in run
ValueError: too many file descriptors in select()"

I am unsure on how to fix this and I am unsure on how to read the debug logs as it appears its just searching for articles, getting responses saying the articles are not there, and then the error is thrown randomly.

Is it possible this could be a specific server issue? Have I reached any limits I am not aware of?

I am running the newest version on Windows Server 2022. I have tried both the installed version and the x64 "portable" with the same results.

Here is a screenshot of the error:

Image
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by safihre »

You have too many servers for your system to handle.
Reduce the number of Enabled servers or reduce the number of connections per server.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
patrick8996
Newbie
Newbie
Posts: 4
Joined: November 30th, 2024, 5:24 am

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by patrick8996 »

safihre wrote: November 30th, 2024, 5:42 am You have too many servers for your system to handle.
Reduce the number of Enabled servers or reduce the number of connections per server.
Is there a way to address this on my servers end? I can easily lower the connections I am just curious if this is something I can address/configure on the servers end to prevent this from occurring.

If lowering the connections/removing servers is the suggested option then I will go ahead and do that.
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by sander »

Now I'm interested: how many servers how you defined, and how many connections per server? About connections per server: less is more. If you're on a 1000 Mbps = 1Gbps, a *total* of 50 or maybe 100 connections should be enough.

(@safihre: is this interesting for Windows: https://stackoverflow.com/a/47689451 ?)
User avatar
safihre
Administrator
Administrator
Posts: 5523
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by safihre »

I think the current limit is 512.
https://stackoverflow.com/questions/738 ... hat-select

If it was 64 we would have a lots of complaints 😄
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by sander »

> I think the current limit is 512.
> If it was 64 we would have a lots of complaints

Good. That's why I'm interested what OP has filled out.

With 25 connections to newshosting alone, I get 250 MB/s = 2500 Mbps. So 10 MB/s = 100 Mbps per newshosting connection. Impressive.
patrick8996
Newbie
Newbie
Posts: 4
Joined: November 30th, 2024, 5:24 am

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by patrick8996 »

sander wrote: November 30th, 2024, 6:44 am Now I'm interested: how many servers how you defined, and how many connections per server? About connections per server: less is more. If you're on a 1000 Mbps = 1Gbps, a *total* of 50 or maybe 100 connections should be enough.

(@safihre: is this interesting for Windows: https://stackoverflow. com/a/47689451 ?)
I am probably ashamed to admit how many servers I have. I should honestly downsize tbh but I have a total of 9 primary servers and 3 bonus/block. Some of them are bundles which include access to one or the other.

As for connections most of them varied from 50-100 as I really didn't configure or test this and haven't ran into an issue until now so I never really lowered them. I lowered most of them down to 30 besides the ones that are hard limited to lower then that and I have not seen the error come up again. I also just downgraded from a 10GBps server to a 1GBps private server for costs sake so I probably should have lowered the connection amounts when I downgraded.
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by sander »

So, if at same prio, a total of 12*50 = 600 up to 12*100 = 1200 connections. That's unnecessarily high ... at least, if your newsservers are not too far away from you SABnzbd client. Plus: above the 512 Windows limit Safihre mentions, so not possible at all.

Private server = VPS? With Windows? Interesting. I thought the VPS market was mostly Linux.

> I have not seen the error come up again.

Good!
patrick8996
Newbie
Newbie
Posts: 4
Joined: November 30th, 2024, 5:24 am

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by patrick8996 »

sander wrote: November 30th, 2024, 7:28 am So, if at same prio, a total of 12*50 = 600 up to 12*100 = 1200 connections. That's unnecessarily high ... at least, if your newsservers are not too far away from you SABnzbd client. Plus: above the 512 Windows limit Safihre mentions, so not possible at all.

Private server = VPS? With Windows? Interesting. I thought the VPS market was mostly Linux.

> I have not seen the error come up again.

Good!
Yeah some misconfiguration on my end and I appreciate the assistance.

I run everything off of a hosted windows server dedicated machine/media server. Never really got into Linux setups, although it probably would have been easier to learn and troubleshoot over the years. But at this point its a fairly solid and and reliable setup.
User avatar
sander
Release Testers
Release Testers
Posts: 9070
Joined: January 22nd, 2008, 2:22 pm

Re: Error ValueError: too many file descriptors in select() - Please Help

Post by sander »

If you know Windows, a Windows VPS is probably easier than learning Linux. So: good for you.

And that means Windows on a VPS is "affordable". Well done by Microsoft.
Post Reply