timeout when adding NZB via UI whilst downloading

Report & discuss bugs found in 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
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

timeout when adding NZB via UI whilst downloading

Post by OneCD »

Hello.
  • SABnzbd 2.3.3 with the "Glitter - Night" skin
  • Python 2.7.13
  • Debian 9.4 Stretch (64b)
  • Intel Atom D2700 with 2.9GB RAM.
  • System load is currently in the low-to-mid 3's - but this problem occurs even when less than 1.
  • Accessed via FireFox Quantum 59.0.2 (64b) on a separate Debian system.
I noticed (about the time I upgraded to 2.3.3 from 2.3.2) that most of the time, when I add one or more NZBs via the web UI, the importer seems to crash. This occurs if the queue is downloading like it usually is, and I try adding a largish NZB. If it's over about 2MB, it will happen every time. I'll see errors start accumulating in the log even though the foreground indicates the file is still uploading. I have to close that tab, and open a new one. I then check the UI error log and see something like this on the web-page:
Traceback (most recent call last):
File "/opt/sabnzbd/cherrypy/_cprequest.py", line 663, in respond
self.body.process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 989, in process
super(RequestBody, self).process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 558, in process
proc(self)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 223, in process_multipart_form_data
process_multipart(entity)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 215, in process_multipart
part.process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 556, in process
self.default_proc()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 715, in default_proc
self.file = self.read_into_file()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 730, in read_into_file
self.read_lines_to_boundary(fp_out=fp_out)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 667, in read_lines_to_boundary
line = self.fp.readline(1 << 16)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 860, in readline
data = self.read(chunksize)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 824, in read
data = self.fp.read(chunksize)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 360, in read
data = self.rfile.read(size)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 1138, in read
data = self.recv(left)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 1070, in recv
data = self._sock.recv(size)
timeout: timed out
If I don't close that uploading tab, I'll end up with a bunch of these timeout blocks.

Here's the SABnzd info log for the same event logged above. As can be seen, this NZB is a little over 5MB. The timeout occurred after (maybe) 30 seconds:
2018-05-25 15:57:29,341::INFO::[_cplogging:219] [25/May/2018:15:57:29] HTTP
Request Headers:
Content-Length: 5396386
REFERER: http://talia:8800/sabnzbd/
HOST: talia:8800
CONNECTION: keep-alive
Remote-Addr: 10.0.0.10
ACCEPT: */*
USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
X-REQUESTED-WITH: XMLHttpRequest
ACCEPT-LANGUAGE: en-AU,en-US;q=0.7,en;q=0.3
DNT: 1
Content-Type: multipart/form-data; boundary=---------------------------<HASH>268
ACCEPT-ENCODING: gzip, deflate
COOKIE: wanted_view=list; snatched_view=list; soon_view=thumb; suggest_view=thumb; late_view=list; manage_view=thumb; blu_ray_com_new_releases_view=thumb; imdb_movies_in_theaters_view=thumb; imdb_box_office_view=thumb; advanced_toggle_checked=0; compact_display_state=false; ys-detailsPanel=o%3Aheight%3Dn%253A515
2018-05-25 15:57:29,343::ERROR::[_cplogging:219] [25/May/2018:15:57:29] HTTP
Traceback (most recent call last):
File "/opt/sabnzbd/cherrypy/_cprequest.py", line 663, in respond
self.body.process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 989, in process
super(RequestBody, self).process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 558, in process
proc(self)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 223, in process_multipart_form_data
process_multipart(entity)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 215, in process_multipart
part.process()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 556, in process
self.default_proc()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 715, in default_proc
self.file = self.read_into_file()
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 730, in read_into_file
self.read_lines_to_boundary(fp_out=fp_out)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 667, in read_lines_to_boundary
line = self.fp.readline(1 << 16)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 860, in readline
data = self.read(chunksize)
File "/opt/sabnzbd/cherrypy/_cpreqbody.py", line 824, in read
data = self.fp.read(chunksize)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 360, in read
data = self.rfile.read(size)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 1138, in read
data = self.recv(left)
File "/opt/sabnzbd/cherrypy/wsgiserver/__init__.py", line 1070, in recv
data = self._sock.recv(size)
timeout: timed out
2018-05-25 15:58:18,247::INFO:: <--- and back to normal.
But if I stop the download queue, then add the NZBs, no problem.

I've been bypassing the UI and putting these NZBs in my watch folder instead as this works every time.

Any thoughts? Thank you. :)
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: timeout when adding NZB via UI whilst downloading

Post by safihre »

Hmm, seems the sockets are too busy to get data for your upload. CherryPy is trying to read new incoming data, but can't.
Seems like a priority problem in which connections come first, this is on the NAS right?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

Re: timeout when adding NZB via UI whilst downloading

Post by OneCD »

Yes, NAS is correct.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: timeout when adding NZB via UI whilst downloading

Post by safihre »

Wonder if we can do anything about that.. Pause downloading while we get uploads to keep the sockets free?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

Re: timeout when adding NZB via UI whilst downloading

Post by OneCD »

Is that an option/switch already? Can we make it one? ;)
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: timeout when adding NZB via UI whilst downloading

Post by safihre »

I should just make SAB faster so it doesn't happen at all :D
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
OneCD
Hero Member
Hero Member
Posts: 557
Joined: March 4th, 2017, 3:47 pm

Re: timeout when adding NZB via UI whilst downloading

Post by OneCD »

Or I should stop running it on 6 year old hardware. ;D
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Post Reply