Connection to Backend Lost - Continuously

Sonarr version (exact version): 2.0.0.4949
Mono version (if Sonarr is not running on Windows): N/A
OS: Windows 10 Home
((Debug logs)): https://drive.google.com/open?id=0B6SdVz5hFc0VMGJGMXpOUGtoMVU and a second one https://drive.google.com/open?id=0B6SdVz5hFc0VYlhJei1hMmQ2SW8

Description of issue: Let me start by saying I’ve been searching for an answer to this issue for a couple weeks. All existing issues seem to fit one of two categories; 1. The issue is from a while ago (or a few versions ago) that mods say new updates have fixed the issue. or 2. The issue is for non-windows machines. Now it doesn’t seem to matter what I do. Every time I restart Sonarr it will give me the “Connection to backend lost” error. The time it takes can vary from 30 seconds to hours. I’ve done nothing to change Sonarr and have been running it now for about 6 months. This issue just started about mid July. When the error pops up, my GUI page for Sonarr gets greyed out so I cannot interact with it, and the “running” icon in my task bar is there until I hover over it. When I hover over it, the icon will then disappear.

I’ve tried to uninstall/reinstall, wipe the db files and create new ones, fixed naming errors, removed “ended” shows, install as a program AND as a service, and none of these have fixed the issue. I love this program and would appreciate some help getting it back up and running.

That sounds like Sonarr is crashing.
When that occurs does task manager show Sonarr running? (It’ll be under NzbDrone.exe or NzbDrone.Console.exe)

17-8-23 07:13:18.2|Trace|HttpClient|Res: [GET] http://skyhook.sonarr.tv/v1/tvdb/shows/en/270408: 200.OK (1675 ms)
17-8-23 07:15:32.9|Debug|ProcessProvider|Found 0 processes with the name: NzbDrone.Console

I see one case in the logs where Sonarr was started, but nothing before it starts up appears to be a problem. Trace logs leading up the the crash would be useful, to see if it’s doing the same thing before a crash multiple times.

Sorry for the delayed response, I’d been gone all weekend. To answer your questions -

No, when this occurs, there are no longer any NZBDrone executables running in Task Manager.

I started Sonarr up, set the logs to Trace, exited Sonarr, moved the current logs and restarted Sonarr so it would create a fresh log containing only this start up. As you can see from the logs, this run of Sonarr only lasted 52 seconds. I’ve attached a link to the latest Trace.

https://drive.google.com/open?id=0B6SdVz5hFc0VUU5odEFsdDF5UVE

The logs don’t indicate anything abnormal is occurring, but it’s possible that the logs aren’t being written when it crashes.

Can you do the following:

  1. Stop Sonarr
  2. Open Command Prompt (cmd.exe)
  3. Run: C:\ProgramData\NzbDrone\bin\NzbDrone.Console.exe > C:\ProgramData\NzbDrone\output.txt 2>&1

When Sonarr stops running again if you could post output.txt from C:\ProgramData\NzbDrone, this will capture anything that is written be Sonarr to the console output and may capture something the log files have missed.

Thank you for the quick response. I did as you asked. Sonarr seemed to only run for about 30 seconds before giving an unhandled exception error. Here is the Output log.

https://drive.google.com/open?id=0B6SdVz5hFc0VbnppOXc4a05vdnc

Hello, I’m just checking in to see if the logs show anything that would help?

Which anti-virus/anti-malware software are you using, if any?

Typically issues such as this are caused by anti-virus/anti-malware software, but can also be caused by other software on the system or physical memory corruption.

Just Windows Defender. But this has been in my system the whole time, with these issues not being present until around Mid July.

As a follow up to this, I just disabled Windows Defender and the program crashed before making it through the indexing (about 30 seconds in).

@Taloth do you think a memory test is the next course of action here or is there something else we should look at?

Seeing your post, I did a preemptive memory check running MemTest86. Everything passed with no issues. I’ve included a link to the test results.

https://drive.google.com/open?id=0B6SdVz5hFc0VZlI2bU1HOE9QSUU

Again thank you for your help. This has been such a frustrating issue.

Can you open C:\ProgramData\NzbDrone and rename the MediaCover folder and then start Sonarr up again and see what happens?

One thing to note is a memory test run within windows isn’t as exhaustive as one done outside windows (via a bootable USB/CD).

Sadly, the same result. It started rebuilding the folder and it’s contents, made it about 15 seconds and crashed. Also, although the log was saved as an HTML file, I did perform the mem test from a bootable USB drive prior to windows booting. I did however just try to look at my previous link to the log and see that the HTML save file doesn’t open correctly so here is a link to a copy/paste I did in GoogleDocs.

Now in fact it seems my crash time is much quicker. If I’m lucky, Sonarr will stay open for about 15 seconds, regardless of what I do - then it crashes; every time :frowning:

At this point I am at a complete loss of what else to do. Is there anything else can I send you to resolve this issue? I loved how Sonarr worked for the first 6 months, and would really like to get back to having it work as intended.

Besides trying to reinstall the latest .net framework, I’m not sure what else to check. It’s failing when resizing the images for better performance in the UI (and saves data), but I don’t think I’ve ever seen this under Windows, just some linux systems that were missing the binaries required to do it.

Reinstalled the latest .net - didn’t work. Tried to install radarr and it seems to stay running with no issues. This appears to be limited to just sonarr. :frowning:

With a movie added?

Radarr does the same resizing, with a small change for detecting libgdiplus on non-Windows platforms. Sonarr’s implementation hasn’t changed since last year.

You are right - I didn’t add any movies and thought of that this morning prior to logging in. Forget my last comment about radarr. So I guess the question is, how do I fix the error with resizing?

Okay - give me a bit here (maybe the rest of the day). It’s way to early to say I found the issue, but Sonarr isn’t crashing 15 seconds in, so we will see.
I was chatting with an admin in NZBgeek about possible alternatives to Sonarr I could try during this troubling time and it was suggested that Windows could have done an update that messed with my settings (because that never happens).
Anyway, upon further investigation it would seem that a recent update moved me from my “Private Network” to the “Guest or Public Network”. I’ve moved myself back to my Private Network and Sonarr has now been running for 10min. I know, 10min is a small amount of time, but it’s a vast improvement over the 15sec I was getting.
I’ll update later and let you know if Sonarr is still running.

Sadly - this did not make it. Although it did last longer than before, Sonarr died again shorlty after posting. sigh

So for the last 5 hours I have been running Sonarr in “Table” view instead of “Overview List” and (knock on wood) it’s been stable. Do you know if this mode will prevent the crashing (since it should be resizing any images)?

The images are resized when they are pulled in from TheTVDB, not when they are accessed, so it shouldn’t make a difference. You can check the MediaCover folder (each series has it’s own folder inside) and see if there are resized images inside.

There are resized images in all the folders. Sadly today it’s back to crashing in 15sec.