EPG not updating automatically, and backups not working

Server Version#: Latest
Player Version#: Latest

I have the Plax server installed on a Windows 11 host - and it works well generally. However, very often the EPG fails to update, and then recordings stop. I have to go in and manually ‘refresh the guide’.

I have the option checked to auto-refresh. Any ideas where I can look to troubleshoot why automatic guide updating is not occuring?

Can anyone provide guidance on how to collect the needed logs to troubleshoot the issue without including pii in the logs - and filtering only for logs related to the EPG scheduled updates (filtering the manual updates) so that the issue can be diagnosed?

Thank you!

Server Logs

You could remove your email from the ‘Plex Media Server.log’ but the rest is needed.

Which of the files are needed? They appears to be for different backend processes. Given the issue is failure to automatically update the EPG - which is needed?

Looking for ‘epg’ in the logs, I found in ‘Plex Media Server.log’ lots and lots of entries like this occurring just after 5am - which is when the program guide should automatically update:

Oct 23, 2024 05:13:48.512 [680] WARN - [Req#1956e81] Invalid library metadata ID plex://show/5fc6a9f3b360df002ddf7f67 passed.
Oct 23, 2024 05:13:48.512 [680] ERROR - PlexClient::downloadContainer: expected MediaContainer element, found html
Oct 23, 2024 05:13:48.512 [680] WARN - Subscription: No container available for /tv.plex.providers.epg.cloud:4/metadata/plex%3A%2F%2Fshow%2F5{show_nonce_removed}
Oct 23, 2024 05:13:48.512 [680] ERROR - Subscription: Error refreshing sub: No container found

Of course, I have no idea if this is even the right thing for this issue. Plex seem to have an absolute policy it seems of not providing specific guidance to anyone looking for specific details on how to troubleshoot a specific issue - instead simply pushing paying customers to the forum and seemingly hoping that other customers will help out, and asking for full logs to be provided (with lots of things like email address, details of shows recorded, shows watched, etc etc…).

I’m looking for detail on where to look for the issue I am having. I am not looking to have to upload full logs and have someone else find the issue. Any help on where to look for the specific issue being experianced would be hugely appreciated.

I can’t really help you with describing exactly what you should be looking for, but I can tell you that on my perfectly functional Plex live TV/DVR setup I see each message you listed. So it’s doubtful that any of them are related to your problem.

Plex logging can be a bit pedantic at times, showing errors and warnings that, while technically accurate, don’t really mean anything. There are all kinds of errors and warnings that get logged even on perfectly functional systems.

As a troubleshooting step, you might want to consider deleting and recreating your DVR in Plex. And if that doesn’t help, delete and recreate all you recording schedules. However, before you attempt either of those, the first thing I’d do is to check my database for errors. The easiest way to do that would likely be to just check you Plex Media Server.log for the words “malformed” and “corrupted.”

ChuckPa’s excellent DBRepair.sh script can also perform this consistency check and can automatically repair it as well, assuming the damage isn’t too severe.

Thank you so much for the tips…

I check all of the ‘Plex Media Server.log’ files for ‘corrupted’ and ‘malformed’ - and there were zero matches. Before I dive dow a database corruption theory does the lack of these matches essentially rule this out?

If the database (or the DVR) be corrupted such that it does not update on the schedule - then surely a manual update would also fail (and the manual process works flawlessly). I have since figured out how to force an update via the Plex API - and that is also working fine. However, leaving Plex to automatically refresh the EPG is simply not occurring.

Other than the lack of automatic scheduled EPG updates - nothing else about the system is misbehaving. I also see the recommendation “try deleting and recreating the DVR” a lot - and I would want to have a reasonable confidence that this will actually work before I do this. I have a lot of shows I would have to re-setup. How can the recording schedule mess with the auto-updating of the EPG in such a way that it simply either does not run (or throws errors we cannot find) such that a manual trigger to update works flawlessly?

I will give the script a try - on the theory it should not make things worse!

Michael.

Seems the script is for most Plex platforms except Windows. At lest the documentation does not cover using it on Windows.

[DBRepair] The blue windows folder has them.

With millions of users, 100’s of posts and limited resources the best way to get attention to your problem is to include the downloaded log zip file and the actual version you were running at the time of the post. Latest is almost guaranteed to get you ignored.

The refresh does a full download of the schedule and the nightly batch does an incremental. Plex Media Server.log and its rollovers are the best place to look for the processing that occurs when epg is updated. You know when your scheduled tasks run and can compare that to when you do a manual refresh to look for anything permission or corruption related.

If the epg database isn’t corrupted then you have permission, networking or the computer goes to sleep during the scheduled tasks. So you can see why having access to all the log files is necessary to figure out what is going on without a lot of back and forth posting.

If you stop plex, delete the tv.epg.providers.* files from the Database directory, restart and full refresh should give you a new epg database eliminating any corruption concerns.

Thank you. Apparently, I was blind to the word ‘Windows’. I appreciate pointing me to look again.

I ran the powershell version - and it worked thru it’s process. No errors or corruption were reported.

The log is extreamly noisy around the time of the EPG update - mostly due to the server being very busy with other tasks thru the night. Is there a string I can use to filter the ‘Plex Media Server.log’ file only for the EPG update activities as well as the scheduler then any errors would be far more apparent?

Thank you! I am running this now just to be sure there is no corruption involved.

My gut is telling me that this is not an EPG update process issue though. I think the scheduler is simply not firing it because the PMS is busy continuously. Are there any known race conditions that could cause PMS to simply skip updating the EPG if it’s doing a metadata scan at the time, or checking the days recordings for commercial breaks (for instance)?

I would love to be able to filter the ‘Plex Media Server.log’ file to just show events from particular parts of the system, for example just the scheduler?

If I’m not mistaken, I believe most (all?) of the scheduler tasks will have a label of “Butler” included in the logs. For example:

Oct 27, 2024 04:00:39.492 [0x70000876c000] DEBUG - Butler: we're in the window, starting.
Oct 27, 2024 04:00:39.492 [0x70000876c000] DEBUG - Butler: Waking up!
Oct 27, 2024 04:00:39.492 [0x70000876c000] DEBUG - Butler: Scheduling randomized task 'RefreshEpgGuides' in 53 minutes.
...
Oct 27, 2024 04:53:39.448 [0x700008b84000] DEBUG - Butler: Starting delayed task RefreshEpgGuides.

You should see something similar to the third line in your logs indicating when the EGP refresh is scheduled to start. And after that period of time, you should see something similar to the fifth line. Though that could be delayed (or maybe early) depending on other factors, I think.

Some other labels which might be of interest:
DVR recording/scheduling: “Grabber”/“grabber”
Transcoding decisions: “MDE:”
Hardware transcoding: “TPU:”

And many others, I’m sure. These are just some common ones.

Of course - zero hits in the log for ‘Butler’… Likely because it’s a debug level log (and my log level is not set to debug!).

I’ll throw it to ‘Debug’ overnight tonight and see what I can capture. Thank you so much!

If you change the log level you have to restart the server. for it to take effect.

Good to know - thank you!

I went to check my log just now for the EPG update that should have occured overnight last night to find out the logs rotate at 10MB - and this only covers me for about an hour each log - so after about 5 hours the events are gone.

I’ll try again in the morning…

See “LogNumFiles” at this link to increase the number of log files it keeps before rotating:

https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/#toc-1

But also be certain you didn’t enable verbose logging. That will cause your logs to roll way too quickly to be useful. Debug logging should be sufficient for most cases. I don’t think I’ve seen a case where it wasn’t able to catch more than twelve or so hours.

Just remember, regarding logging changes, when you decrease the logging level, a server restart is generally required for the change to take effect (for security reasons). Also, for advanced settings changes, I recommend a restart of PMS.

Also, you can change your maintenance window to cause the scheduled tasks to run sooner (and then change it back, of course).

Thank you all!

Changes made. Hopefully I can get what’s needed to find out whats wrong.

Michael.

1 Like

OK - very strange.

In my ‘Plex Media Server.log’ (and all the .1, .2 etc) I am getting [DEBUG] information.
However, overnight last night not a single event containing ‘Butler’.

This seems to me iike the scheduler is simply not firing at all.

What process is responsible for running the scheduler? Is there another log I should be looking at?

There isn’t a separate process, it is all within the PMS.

Verify that there are database backups every 3 days, should be 5 of them and that they are current.
You have run the repair db option not just the consistency check.
Verified that there are no major gaps in time for the Plex Media Server.log files especially during the scheduled tasks window.

Either your server is going to sleep during the scheduled tasks or you have some sort of logical corruption deep in the database files and the only fix is to delete them and start over.