I think this is a feature request…? Anytime I wake up my server from sleep, I’m seeing a bunch of search errors in my logs for the first few entries:
FetchFeedService PfMonkey http://www.pfmonkey.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed>&limit=100&rid=34506&season=1&ep=6 The remote name could not be resolved: 'www.pfmonkey.com' 1:00 AM
FetchFeedService Dognzb.cr https://api.dognzb.cr/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed>&limit=100&rid=34506&season=1&ep=6 The remote name could not be resolved: 'api.dognzb.cr' 1:00 AM
HttpProvider Failed to get response from: http://www.pfmonkey.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed>&limit=100&rid=34506&season=1&ep=6 The remote name could not be resolved: 'www.pfmonkey.com'
I think my NZBDRONE is waking up faster than my internet connection (My boot disk is an SSD and it does wake up extremely fast) and causing these errors as my normal searches (when the machine has been running for awhile) perform fine.
Is it possible to add a small delay (60 seconds maybe?) for that first search when the program resumes?
As a possible workaround, rather than modifying the program, I happened to notice that I can set the statup in windows services to “Automatic:Delayed Start”. In theory this should wait 2 minutes before resuming NZBDrone which should give my router time to connect to the outside world…
Has anyone messed with the delayed start in windows services?
This isn’t something we can do, drone has no knowledge that the computer was sleeping. It knows the jobs haven’t been run for a period of time, but it can’t determine why.
I am a recent Sickbeard convert, and i’m sure you are sick of hearing “but sickbeard does this”… however, any ideas how they are doing this?
Change our scheduled tasks to use delay start instead of just kicking off immediately to let SB finish it's start-up routines. Also silent logging until the actual routine is ran, prevent erroneous logging when we were just checking to see if it was time to actually start the scheduled task.
We delay the currentSearch (rss) by 5 mins
We delay the autoPostProcesser by 5 mins
We delay the backlogSearch (limited/full) by 17 mins
We delay the properFinder/showUpdate by 1 cycle (1hr)
This applies to resume as well as fresh boot… I really love NZBDrone, the problem I’m finding is that I have my server set to wake up at 1, do some checks to see if anything needs downloaded and then go back to sleep at 1:30 if not. By not being able to search at 1 and then not trying to search again for an hour, it’s not actually finding anything until it’s had a chance to be on for at least an hour. Couchpotato lets me set which minute of the hour I want it to search, so I set that to a random 12 minutes after the hour which works well too.
The 2 options I think I have in my settings is to either reduce my rss frequency to >30 minutes or up my awake time to more than 1 hour and quit whining…?
How do you know it applies to both? SB’s delay seems to be a fix for an internal startup routine, not the system’s, sounds like a happy accident that it helps with your case.
Unless you’re seeing drone start up again (logging the entire startup process) after resuming from sleep its not something we can do as part of the start up routine. If is is starting up again I’d be surprised because that defeats the purpose of going to sleep (and I’d have expected to see that behavior with other applications).
Perhaps its either how SB is running (not as a service likely), or related to how it runs through python.
I know because I ran SB for 3 months before shaving my head and drinking the drone kool-aid. It was definitely happy accident, the delay is intended to allow slow systems to get up and running and that’s not exactly my problem…
Here is what I see during a resume from wake:
FetchFeedService OZnzb.com https://www.oznzb.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'www.oznzb.com' 6:52 PM
HttpProvider Failed to get response from: https://www.oznzb.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'www.oznzb.com' 6:52 PM
FetchFeedService Dognzb.cr https://api.dognzb.cr/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'api.dognzb.cr' 6:52 PM
HttpProvider Failed to get response from: https://api.dognzb.cr/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'api.dognzb.cr' 6:52 PM
FetchFeedService PfMonkey http://www.pfmonkey.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'www.pfmonkey.com' 6:52 PM
HttpProvider Failed to get response from: http://www.pfmonkey.com/api?t=tvsearch&cat=5030,5040&extended=1&apikey=<removed> The remote name could not be resolved: 'www.pfmonkey.com' 6:52 PM
As you said, it’s just trying to complete the search it missed and my router hasn’t quite had time to get up and running. I changed my RSS frequency so it will at least catch a search during the 30 minutes awake and this won’t matter…
Sorry if it sounded like I was saying drone was somehow inferior because of the delay SB imposes, I think you guys are working miracles with Drone and that wasn’t my intention, rather I have nothing else to compare drone to.
Implementing some power management event handling on windows is certainly possible, but mono is a little more tricky, since we have to handle dbus events and verify it on a couple of distros.
That’s a lot of work for something that small, suffice to say this would end up near the bottom of the todo pile.
It’s way easier to check for an internet connection. That’s something I can get behind.
A potential workaround would be to, via a script, stop the nzbdrone service and delay start it again after resume.
And no, it didn’t sound as if you were calling drone inferior. To me it was simply “They do it, so it might be possible to implement in drone, right?”
Is there any potential for collateral damage from stopping the service prior to going to sleep? I use a program for sleep/wake schedules that can start/stop services as needed, I was just concerned that I might corrupt something in drone by doing this.
I’m getting the rss sync updates now that I’ve changed it to 26 minute intervals, I think the only thing I’m missing is an actual NZBDrone version update check (at least I think that is what “services.nzbdrone.com” is):
Drone is working great, grabbing what I want and the functionality is unparalleled so I really kinda feel like I’m nitpicking. I think as long as my server is on for several hours a day it will eventually update the scene mappings and have a chance to do a version check so I really won’t be missing anything at the end of the day.
Might be too soon to tell, but I think the issues I was seeing in my logs were related to a failing hard drive (a separate data drive, not my SSD, seemed to be causing some bottleneck issues that were manifesting in strange places). All I know is that since pulling that drive, all my show updates, rss updates and other Drone updates have ran seamlessly (it’s only been 24 hours, but I’ve had zero errors in the logs).
I thought I would let the future user that finds this thread know that it appears my errors were actually hardware related, not Drone related…
Windows can act pretty strange when drives start to fail and Windows attempts to access it. Thanks for the info, we’ll still see what we can do down the road to prevent drone from acting up as well.
This is an old thread i know, but i’m having the same issue. After the pc wake’s up, sonarr seems like its checking the rss feeds before the internet connection has restarted and so no episodes can be found until the next search.
I’ve tried scripts for stopping and re-starting sonarr after a delay but that just seems to result in the sonarr config file getting corrupted more often then not.
I did end up setting the service to automatic (delayed start) with retries recently due to a similar issue; but what has really helped is biting the bullet and letting my server run 24/7. Not the fix for everyone but I was messing with too many things trying to make it sleep for what amounted to 4-6 hours a day.
Good luck, I’m sure markus will chime in before long.
Ye everything worked fine running 24/7 but my server uses a lot of power and so decided to reduce the time it was left on. Its working out fine apart from rss sync as its now missing some episodes every day. The tv sd feeds are filled full of dvdrips so its easy to miss new episodes.
The rss sync service seems to run on its own. Even if set the nzb drone service to be stopped before standby and then not to restart the service until 3 minutes after resume, the rss sync service still seems to run immediately when the pc resumes.