"No space left on device" after cleaning up disk / API

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
RuudBurger
Sr. Member
Sr. Member
Posts: 305
Joined: July 2nd, 2010, 6:11 am

"No space left on device" after cleaning up disk / API

Post by RuudBurger »

Tonight a backup went to wrong folder (NFS share didn't mount) so my root drive got filled 100%.

1. First issue is that, my whole settings reset if this happens. Got a few friends that didn't have limit set and if there is no space left, ini writing fails.
Maybe make sure there is a few MB free before writing an empty ini?

2. So I cleanup the files, 30GB now left on and setup SAB like before. Still it fails. So I dig a little deeper and see the following error is returned when sending an nzb file:

Code: Select all

01-17 12:23:57 INFO [.core.downloaders.sabnzbd] Sending "Movie 2014.720p BluRay x264 Dts-NOHATE" to SABnzbd.
01-17 12:23:57 INFO [hpotato.core.plugins.base] Opening url: post http://192.168.2.3:5052/api?nzbname=Movie+2014.720p+BluRay+x264+Dts-NOHATE.cp%28tt1065073%29&apikey=xxx&cat=films&priority=0&mode=addfile&output=json, data: []
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
    <title>500 Internal Server Error</title>
    <style type="text/css">
    #powered_by {
        margin-top: 20px;
        border-top: 2px solid black;
        font-style: italic;
    }

    #traceback {
        color: red;
    }
    </style>
</head>
    <body>
        <h2>500 Internal Server Error</h2>
        <p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>
        <pre id="traceback">Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 612, in respond
    self.process_body()
  File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 733, in process_body
    keep_blank_values=1)
  File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 8, in __init__
    cgi.FieldStorage.__init__(self, *args, **kwds)
  File "/usr/lib/python2.7/cgi.py", line 507, in __init__
    self.read_multi(environ, keep_blank_values, strict_parsing)
  File "/usr/lib/python2.7/cgi.py", line 636, in read_multi
    environ, keep_blank_values, strict_parsing)
  File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 8, in __init__
    cgi.FieldStorage.__init__(self, *args, **kwds)
  File "/usr/lib/python2.7/cgi.py", line 509, in __init__
    self.read_single()
  File "/usr/lib/python2.7/cgi.py", line 646, in read_single
    self.read_lines()
  File "/usr/lib/python2.7/cgi.py", line 668, in read_lines
    self.read_lines_to_outerboundary()
  File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 54, in read_lines_to_outerboundary
    self.__write(odelim + line)
  File "/usr/lib/python2.7/cgi.py", line 678, in __write
    self.file.write(line)
IOError: [Errno 28] No space left on device
</pre>
    <div id="powered_by">
    <span>Powered by <a href="http://www.cherrypy.org">CherryPy 3.2.0</a></span>
    </div>
    </body>
</html>
I tried restarting SAB, with the same issue. Only a full reboot of the system fixed the issue.
I see the issue is in python (or the filesystem) itself, so you can't fix that. But you can at least catch the error and return a proper response from the api (json formated).

I got a few users of CouchPotato coming in with same issues where it reported "wrong api key" and they know the api key is the same. But as long as there isn't json returned, I don't have a way of catching the error and notifying the user.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: "No space left on device" after cleaning up disk / API

Post by shypike »

1. The backup should be automatically used.
Could be a bug that prevents this from happening. I'll see what I can do.

2.
I'm not sure what you are asking here.
What's probably happening is that the CherryPy web framework cannot handle the "disk full" situation.
There's not a lot I can do about that.
Release 0.8.0 will have a much more recent version of CherryPy, so that may improve in the future.
SABnzbd does show a warning in its own UI (unless you disabled that),
assuming it doesn't run into the same problem.
Post Reply