Sabnzbd hangs while post-processing

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
x5nder
Posts: 6
Joined: Thu Jan 30, 2020 9:31 am

Sabnzbd hangs while post-processing

Post by x5nder »

Occasionally, Mylar sends a comic to Sabnzbd and the post-processor (comicrn.py) will hang... I have to manually stop the process in order for the rest of the Sabznbd queue to be processed. In the logs, I found one example of where it goes wrong, but it's probably not enough information -- please let me know how I can provide extra information for troubleshooting.
2021-08-01 23:49:06 ERROR Uncaught exception: Traceback (most recent call last):
File "/app/mylar3/mylar/logger.py", line 337, in new_run
old_run(*args, **kwargs)
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/app/mylar3/mylar/PostProcessor.py", line 1822, in Process
self.nzb_or_oneoff_pp(tinfo=pp)
File "/app/mylar3/mylar/PostProcessor.py", line 2293, in nzb_or_oneoff_pp
return self.Process_next(comicid, issueid, issuenumOG)
File "/app/mylar3/mylar/PostProcessor.py", line 3017, in Process_next
self.sendnotify(series, issueyear, dispiss, annchk, module, imageFile)
File "/app/mylar3/mylar/PostProcessor.py", line 3062, in sendnotify
slack.notify("Download and Postprocessing completed", prline2, module=module)
File "/app/mylar3/mylar/notifiers.py", line 468, in notify
if not response.status_code == 200:
UnboundLocalError: local variable 'response' referenced before assignment
2021-08-01 23:49:06 INFO [POST-PROCESSING][NOTIFIER]Slack notify failed: HTTPSConnectionPool(host='hooks.slack.com', port=443): Max retries exceeded with url: /services/TMZ14P8CX/BR7EGHZMZ/sv0ks9g56JFidPrWyfAljkEf (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Try again'))
2021-08-01 23:49:01 INFO [POST-PROCESSING][UPDATER] Updating Status (Downloaded) now completed for Cable issue: 12
2021-08-01 23:49:01 INFO [POST-PROCESSING][UPDATER] Setting status to Downloaded in history.
2021-08-01 23:49:01 INFO [POST-PROCESSING][DIRECTORY-CHECK] Found comic directory: /mnt/Data/comics/Cable (2020)
2021-08-01 23:49:01 INFO [POST-PROCESSING] [1/1] Starting Post-Processing for Cable issue: 12
2021-08-01 23:49:01 INFO [DUPECHECK] Duplication detection returned no hits. This is not a duplicate of anything that I have scanned in as of yet.
2021-08-01 23:49:01 INFO [DUPECHECK] Duplicate check for /mnt/Data/downloads/complete/Cable.012.2021.Digital.Zone-Empire
2021-08-01 23:49:01 INFO [POST-PROCESSING] issuenzb found.
2021-08-01 23:49:01 INFO [PPINFO-POST-PROCESSING-ATTEMPT] {'comicid': '125678', 'issueid': '874521', 'comicname': 'Cable', 'issuenumber': '12', 'comiclocation': None, 'publisher': None, 'sarc': None, 'oneoff': None}
2021-08-01 23:49:01 INFO Starting postprocessing for : Cable.012.2021.Digital.Zone-Empire
2021-08-01 23:49:01 INFO ComicRN.py version: 1.01 -- autoProcessComics.py version: 2.04
2021-08-01 23:49:01 INFO [API] Api Call from ComicRN detected - initiating script post-processing.
User avatar
evilhero
Site Admin
Posts: 2883
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Sabnzbd hangs while post-processing

Post by evilhero »

It looks like that's an error from your Slack notification that's causing things to hold up - or at least trigger the error. I can't tell if that halts the entire process, as normally once the notif is sent for an item being snatched, just prior to that it sends the item to be monitored - however, you're using the ComicRN script so it's probably causing everything to lock. If something happens to lock the ComicRN script then everything thereafter gets locked, and the only way to clear things out is by restarting Mylar (usually).

Unless you have a specific use case for using ComicRN, I would switch to CDH and use that it's more reliable when it comes to triggering the post-processing on the correct issue. The ComicRN script, while it works fine normally, has to do filename parsing to match up things so there's some chance it could get things wrong at some point.

So yeah, try switching to CDH and see if that solves the SABnzbd problem of hanging - and if not, make sure Mylar is running in debug mode (prior to download something) and then generate a carepackage for us to see what's going on.
Post Reply