Version: 0.5.6
OS: Windows 7 Ultimate 32-bit
Install Type: Windows Zip (did not use installer)
Skin: smpl (but I've used all of them with the same problem)
Firewall: Disabled locally, but the device sits behind a router with a recent build of DD-WRT running SPI enabled
IPv6: Not using, but it is enabled
Reproducible: Yes and no, I haven't found a specific action that makes it happen, but it does happen, several times a day without fail.
Event log gives the following, fairly useless detail:
Faulting application name: SABnzbd.exe, version: 0.5.6.0, time stamp: 0x4917df95
Faulting module name: PYTHON25.DLL, version: 2.5.4150.1013, time stamp: 0x49820b43
Exception code: 0xc0000005
Fault offset: 0x000d4f44
Faulting process id: 0x7c0
Faulting application start time: 0x01cb94d0dd71eff2
Faulting application path: c:\Program Files\SABnzbd\SABnzbd.exe
Faulting module path: c:\Program Files\SABnzbd\PYTHON25.DLL
Report Id: 6011a034-015b-11e0-8c99-00110981cb29
In lieu of any real way to debug or correct the problem, I've come up with the following, kludge solution:
1. Set up both SABnzbd and SickBeard as Windows Services, for ease of monitoring and remote manipulation.
2. Created a simple batch script, using built in command line utilities, and grep like functions to determine if the SABnzbd/SickBeard Service is running, if not RESTART those services. (I've attached my batch script as text at the bottom.)
3. Created a task in Windows Task Scheduler to monitor for the particular event log item that is logged when either apps crash, and execute my batch script (step 2), also I execute the check once an hour just to be sure that everything is running.
Thoughts? Did I reinvent the wheel? Does a method for monitoring and restarting SABnzbd already exist? Is there a solution to the underlying problem that I missed in my searches? It seems as though python is at fault here, not SABnzbd. Is there a way to get better crash details from python?
Thanks!
@ECHO OFF
REM Check if SABnzbd is still running
SETLOCAL
SET file="output.txt"
SET maxfilesize=0
tasklist |findstr /i /r "sabnzbd" > output.txt
for /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
REM If the file is 0 bytes, then the service is not running.
if %size% EQU %maxfilesize% (
echo.The service is not running.
net stop sabnzbd
net start sabnzbd
echo.Service is now running, hopefully.
) else (
echo.The service is running!
)
del output.txt
tasklist |findstr /i /r "sickbeard" > output.txt
for /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
REM If the file is 0 bytes, then the service is not running.
if %size% EQU %maxfilesize% (
echo.The service is not running.
net stop sickbeard
net start sickbeard
echo.Service is now running, hopefully.
) else (
echo.The service is running!
)
del output.txt

