Sonarr (on raspberry) not responding when NAS is shutdown

Sonarr version (exact version): 2.0.0.4949
Mono version (if Sonarr is not running on Windows): 5.2.0.215
OS: Raspbian
((Debug logs)):
debug : https://hastebin.com/ipenulaxoh.sql
trace : https://hastebin.com/dosovakeni.sql (shows “database is locked” error once NAS is available, then everything works again)
Description of issue:
Hello everyone !
I’ve been using sonarr for a while now, and I recently installed it on a raspberry pi with Raspbian. My Synology NAS is mounted on the raspberry through NFS, and is used for long term storage.
Sonarr is downloading files on the raspberry pi, then when the “Completed download handling” is triggered, sonarr renames and sends tv shows to the NAS.

My issue is that when the NAS is shutdown, sonarr is not responding. I’m not sure when it starts not responding, but it might be after 2 to 3 hours or so. Everything else on the raspberry works as expected.
When I start my NAS again (in the log, after 1.5 day), sonarr is responding again, as if nothing happened. So the problem is that I have to keep my NAS on 24/7, which is not what I want, otherwise I would have install sonarr on my NAS :slight_smile:

Do you have any idea what I could do to fix this issue ?
Thanks !

So, nobody’s using a similar setup, and/or having this issue ?
If you have any hint on what I could try to fix this, I would really appreciate it :slight_smile:

Do you have your home directory or Sonarr’s AppData directory mounted on the NAS?

Sonarr doesn’t check if the NAS is online except when importing and even that is indirectly checked by attempting to get free space/import the file and shutting it down wouldn’t cause any issues unless Sonarr was forced to rely on it for reading/writing it’s database, logs or config file.

Hello markus,

Sonarr is installed in the raspberry, here are the path it’s using (I assume it’s default config) :

AppData directory /home/pi/.config/NzbDrone
Startup directory /opt/NzbDrone

I just had to boot my NAS again to check this information, so I took a look at the trace logs, and here is what I got (pretty similar to what I had in the logs of my first post) :
I might have shutdown my NAS at 11pm or something, so the lock does not occur immediatly.

17-10-1 02:15:05.8|Trace|CommandExecutor|CheckForFinishedDownloadCommand <- DownloadMonitoringService [00:00:00.1856980]
17-10-1 02:15:35.7|Trace|Scheduler|Pending Tasks: 3
17-10-1 02:15:35.7|Trace|CommandQueueManager|Publishing UpdateSceneMapping
17-10-2 19:33:31.3|Trace|CommandQueueManager|Checking if command is queued or started: UpdateSceneMapping
17-10-2 19:33:31.3|Trace|Http|Req: 2476 [GET] /
17-10-2 19:33:31.3|Trace|Http|Req: 2477 [GET] /
17-10-2 19:33:31.3|Trace|CommandQueueManager|Inserting new command: UpdateSceneMapping
17-10-2 19:33:31.4|Trace|Owin|SQLite error (5): database is locked

17-10-2 19:33:31.4|Trace|Http|Res: 2477 [GET] /: 200.OK (111 ms)

Where does /home/pi/.config/NzbDrone physically reside?

It’s located in the SD card of the raspberry. All the other services (Deluge Web UI, Jackett) are working fine when Sonarr is hanging.

I’m not sure what would cause this, but Sonarr doesn’t require the NAS to be online unless it’s DB/config/log files are stored there, but that’s not the case here.

17-10-2 19:33:31.4|Trace|Owin|SQLite error (5): database is locked is not uncommon and not a problem unless it occurs many times in a row, which could be a sign of a dead lock.

And what about the “UpdateSceneMapping” ? Could I try to disable it somehow to see if it changes anything ?

It updates alternate names for series, it does not check files on disk, just updates the DB. It can’t be disabled.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.